|
@@ -31,6 +31,7 @@
|
31
|
31
|
typedef struct asmsh_cmd_s asmsh_cmd_t;
|
32
|
32
|
typedef struct asmsh_cmd_args_s asmsh_cmd_args_t;
|
33
|
33
|
#include "shell.h"
|
|
34
|
+#include "asm_env.h"
|
34
|
35
|
|
35
|
36
|
/** @return <0 on recoverable error 0 on ok, 1+status on exit */
|
36
|
37
|
typedef int (asmsh_cmd_f)(asmsh_t*, asmsh_cmd_args_t*);
|
|
@@ -98,6 +99,8 @@ int asmsh_cmd_maps(asmsh_t *sh, asmsh_cmd_args_t *args);
|
98
|
99
|
|
99
|
100
|
int asmsh_cmd_print_regs(asmsh_t *sh, asmsh_cmd_args_t *args);
|
100
|
101
|
|
|
102
|
+int asmsh_cmd_step(asmsh_t *sh, asmsh_cmd_args_t *args);
|
|
103
|
+
|
101
|
104
|
int asmsh_cmd_syscalls(asmsh_t *sh, asmsh_cmd_args_t *args);
|
102
|
105
|
|
103
|
106
|
// Reset the shell (restart the child etc)a
|
|
@@ -131,8 +134,11 @@ static const asmsh_cmd_t asmsh_CMDS[] = {
|
131
|
134
|
{".regs", asmsh_cmd_print_regs, 1,
|
132
|
135
|
".(regs)", "",
|
133
|
136
|
"display registers value"},
|
134
|
|
- {".syscalls", asmsh_cmd_syscalls, 2,
|
135
|
|
- ".s(yscalls)", "",
|
|
137
|
+ {".step", asmsh_cmd_step, 2,
|
|
138
|
+ ".s(tep)", "",
|
|
139
|
+ "Run the instruction pointed by RIP"},
|
|
140
|
+ {".syscalls", asmsh_cmd_syscalls, 4,
|
|
141
|
+ ".sys(calls)", "",
|
136
|
142
|
"print syscalls name & numbers"},
|
137
|
143
|
{".reset", asmsh_cmd_reset, 0,
|
138
|
144
|
".reset", "",
|