Rev 2939 | Rev 2942 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2939 | Rev 2941 | ||
---|---|---|---|
Line 48... | Line 48... | ||
48 | static void cmd_break(int argc, char *argv[]); |
48 | static void cmd_break(int argc, char *argv[]); |
49 | static void cmd_ct(int argc, char *argv[]); |
49 | static void cmd_ct(int argc, char *argv[]); |
50 | static void cmd_go(int argc, char *argv[]); |
50 | static void cmd_go(int argc, char *argv[]); |
51 | static void cmd_istep(int argc, char *argv[]); |
51 | static void cmd_istep(int argc, char *argv[]); |
52 | void cmd_help(int argc, char *argv[]); |
52 | void cmd_help(int argc, char *argv[]); |
- | 53 | static void cmd_memr(int argc, char *argv[]); |
|
53 | static void cmd_pwt(int argc, char *argv[]); |
54 | static void cmd_pwt(int argc, char *argv[]); |
54 | static void cmd_read(int argc, char *argv[]); |
55 | static void cmd_regs(int argc, char *argv[]); |
55 | static void cmd_stop(int argc, char *argv[]); |
56 | static void cmd_stop(int argc, char *argv[]); |
56 | static void cmd_threads(int argc, char *argv[]); |
57 | static void cmd_threads(int argc, char *argv[]); |
57 | static void cmd_quit(int argc, char *argv[]); |
58 | static void cmd_quit(int argc, char *argv[]); |
58 | 59 | ||
59 | volatile bool quit = false; |
60 | volatile bool quit = false; |
Line 61... | Line 62... | ||
61 | cmd_desc_t cmd_table[] = { |
62 | cmd_desc_t cmd_table[] = { |
62 | { 1, "break", cmd_break }, |
63 | { 1, "break", cmd_break }, |
63 | { 1, "ct", cmd_ct }, |
64 | { 1, "ct", cmd_ct }, |
64 | { 0, "go", cmd_go }, |
65 | { 0, "go", cmd_go }, |
65 | { 0, "help", cmd_help }, |
66 | { 0, "help", cmd_help }, |
- | 67 | { 2, "memr", cmd_memr }, |
|
66 | { 0, "pwt", cmd_pwt }, |
68 | { 0, "pwt", cmd_pwt }, |
67 | { 2, "read", cmd_read }, |
69 | { 0, "regs", cmd_regs }, |
68 | { 0 , "stop", cmd_stop }, |
70 | { 0 , "stop", cmd_stop }, |
69 | { 0, "istep", cmd_istep }, |
71 | { 0, "istep", cmd_istep }, |
70 | { 0, "threads", cmd_threads }, |
72 | { 0, "threads", cmd_threads }, |
71 | { 0, "quit", cmd_quit }, |
73 | { 0, "quit", cmd_quit }, |
72 | { -1, NULL, NULL } |
74 | { -1, NULL, NULL } |
Line 139... | Line 141... | ||
139 | { |
141 | { |
140 | (void)argc; (void)argv; |
142 | (void)argc; (void)argv; |
141 | /*TODO*/ |
143 | /*TODO*/ |
142 | } |
144 | } |
143 | 145 | ||
144 | void cmd_pwt(int argc, char *argv[]) |
- | |
145 | { |
- | |
146 | (void)argc; (void)argv; |
- | |
147 | - | ||
148 | cons_printf("working thread: %d [hash 0x%x]\n", cwt->id, cwt->hash); |
- | |
149 | } |
- | |
150 | - | ||
151 | #define BYTES_PER_LINE 16 |
146 | #define BYTES_PER_LINE 16 |
152 | 147 | ||
153 | static void cmd_read(int argc, char *argv[]) |
148 | static void cmd_memr(int argc, char *argv[]) |
154 | { |
149 | { |
155 | uintptr_t addr; |
150 | uintptr_t addr; |
156 | size_t length; |
151 | size_t length; |
157 | uint8_t buf[BYTES_PER_LINE]; |
152 | uint8_t buf[BYTES_PER_LINE]; |
158 | int to_read, i; |
153 | int to_read, i; |
Line 192... | Line 187... | ||
192 | addr += to_read; |
187 | addr += to_read; |
193 | length -= to_read; |
188 | length -= to_read; |
194 | } |
189 | } |
195 | } |
190 | } |
196 | 191 | ||
- | 192 | void cmd_pwt(int argc, char *argv[]) |
|
- | 193 | { |
|
- | 194 | (void)argc; (void)argv; |
|
- | 195 | ||
- | 196 | cons_printf("working thread: %d [hash 0x%x]\n", cwt->id, cwt->hash); |
|
- | 197 | } |
|
197 | 198 | ||
- | 199 | void cmd_regs(int argc, char *argv[]) |
|
- | 200 | { |
|
- | 201 | (void)argc; (void)argv; |
|
- | 202 | ||
- | 203 | if (cwt) arch_dump_regs(cwt->hash); |
|
- | 204 | } |
|
198 | 205 | ||
199 | void cmd_stop(int argc, char *argv[]) |
206 | void cmd_stop(int argc, char *argv[]) |
200 | { |
207 | { |
201 | link_t *cur; |
208 | link_t *cur; |
202 | dthread_t *dt; |
209 | dthread_t *dt; |