7 #if (CONFIG_COMMANDS & CFG_CMD_BEDBUG)
9 #define CMD_TBL_DIS MK_CMD_TBL_ENTRY( \
10 "ds", 2, 3, 1, do_bedbug_dis, \
11 "ds - disassemble memory\n", \
12 "ds <address> [# instructions]\n" \
15 #define CMD_TBL_ASM MK_CMD_TBL_ENTRY( \
16 "as", 2, 2, 0, do_bedbug_asm, \
17 "as - assemble memory\n", \
21 #define CMD_TBL_BREAK MK_CMD_TBL_ENTRY( \
22 "break", 2, 3, 0, do_bedbug_break, \
23 "break - set or clear a breakpoint\n", \
24 " - Set or clear a breakpoint\n" \
25 "break <address> - Break at an address\n" \
26 "break off <bp#> - Disable breakpoint.\n" \
27 "break show - List breakpoints.\n" \
30 #define CMD_TBL_CONTINUE MK_CMD_TBL_ENTRY( \
31 "continue", 4, 1, 0, do_bedbug_continue, \
32 "continue- continue from a breakpoint\n", \
33 " - continue from a breakpoint.\n" \
36 #define CMD_TBL_STEP MK_CMD_TBL_ENTRY( \
37 "step", 4, 1, 1, do_bedbug_step, \
38 "step - single step execution.\n", \
39 " - single step execution.\n" \
42 #define CMD_TBL_NEXT MK_CMD_TBL_ENTRY( \
43 "next", 4, 1, 1, do_bedbug_next, \
44 "next - single step execution, stepping over subroutines.\n",\
45 " - single step execution, stepping over subroutines.\n" \
48 #define CMD_TBL_STACK MK_CMD_TBL_ENTRY( \
49 "where", 5, 1, 1, do_bedbug_stack, \
50 "where - Print the running stack.\n", \
51 " - Print the running stack.\n" \
54 #define CMD_TBL_RDUMP MK_CMD_TBL_ENTRY( \
55 "rdump", 5, 1, 1, do_bedbug_rdump, \
56 "rdump - Show registers.\n", \
57 " - Show registers.\n" \
60 extern int do_bedbug_dis (cmd_tbl_t *, int, int, char *[]);
61 extern int do_bedbug_asm (cmd_tbl_t *, int, int, char *[]);
62 extern int do_bedbug_break (cmd_tbl_t *, int, int, char *[]);
63 extern int do_bedbug_continue (cmd_tbl_t *, int, int, char *[]);
64 extern int do_bedbug_step (cmd_tbl_t *, int, int, char *[]);
65 extern int do_bedbug_next (cmd_tbl_t *, int, int, char *[]);
66 extern int do_bedbug_stack (cmd_tbl_t *, int, int, char *[]);
67 extern int do_bedbug_rdump (cmd_tbl_t *, int, int, char *[]);
69 /* Supporting routines */
70 extern int bedbug_puts (const char *);
71 extern void bedbug_init (void);
72 extern void do_bedbug_breakpoint (struct pt_regs *);
73 extern void bedbug_main_loop (unsigned long, struct pt_regs *);
82 void (*do_break) (cmd_tbl_t *, int, int, char *[]);
83 void (*break_isr) (struct pt_regs *);
84 int (*find_empty) (void);
85 int (*set) (int, unsigned long);
89 #else /* ! CFG_CMD_BEDBUG */
94 #define CMD_TBL_CONTINUE
100 #endif /* CFG_CMD_BEDBUG */
101 #endif /* _CMD_BEDBUG_H */
105 * Copyright (c) 2001 William L. Pitts
106 * All rights reserved.
108 * Redistribution and use in source and binary forms are freely
109 * permitted provided that the above copyright notice and this
110 * paragraph and the following disclaimer are duplicated in all
113 * This software is provided "AS IS" and without any express or
114 * implied warranties, including, without limitation, the implied
115 * warranties of merchantability and fitness for a particular