aboutsummaryrefslogtreecommitdiff
path: root/gdbstub.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdbstub.c')
-rw-r--r--gdbstub.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gdbstub.c b/gdbstub.c
index d255eab6d5..61cb6b1ab5 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -324,6 +324,24 @@ int cpu_gdbstub(void *opaque, int (*main_loop)(void *opaque), int port)
snprintf(buf, sizeof(buf), "S%02x", ret);
put_packet(buf);
break;
+ case 's':
+ env = cpu_gdbstub_get_env(opaque);
+ if (*p != '\0') {
+ addr = strtoul(p, (char **)&p, 16);
+#if defined(TARGET_I386)
+ env->eip = addr;
+#endif
+ }
+ cpu_single_step(env, 1);
+ ret = main_loop(opaque);
+ cpu_single_step(env, 0);
+ if (ret == EXCP_DEBUG)
+ ret = SIGTRAP;
+ else
+ ret = 0;
+ snprintf(buf, sizeof(buf), "S%02x", ret);
+ put_packet(buf);
+ break;
case 'g':
env = cpu_gdbstub_get_env(opaque);
registers = (void *)mem_buf;