[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 36/52] gdbstub: Implement continue (c pkt) with new i
From: |
Alex Bennée |
Subject: |
[Qemu-devel] [PULL 36/52] gdbstub: Implement continue (c pkt) with new infra |
Date: |
Fri, 7 Jun 2019 10:05:35 +0100 |
From: Jon Doron <address@hidden>
Signed-off-by: Jon Doron <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Alex Bennée <address@hidden>
diff --git a/gdbstub.c b/gdbstub.c
index ad00f223f2..c3089a6b5a 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -1531,6 +1531,16 @@ static void handle_thread_alive(GdbCmdContext *gdb_ctx,
void *user_ctx)
put_packet(gdb_ctx->s, "OK");
}
+static void handle_continue(GdbCmdContext *gdb_ctx, void *user_ctx)
+{
+ if (gdb_ctx->num_params) {
+ gdb_set_cpu_pc(gdb_ctx->s, gdb_ctx->params[0].val_ull);
+ }
+
+ gdb_ctx->s->signal = 0;
+ gdb_continue(gdb_ctx->s);
+}
+
static int gdb_handle_packet(GDBState *s, const char *line_buf)
{
CPUState *cpu;
@@ -1567,13 +1577,16 @@ static int gdb_handle_packet(GDBState *s, const char
*line_buf)
gdb_breakpoint_remove_all();
break;
case 'c':
- if (*p != '\0') {
- addr = strtoull(p, (char **)&p, 16);
- gdb_set_cpu_pc(s, addr);
+ {
+ static const GdbCmdParseEntry continue_cmd_desc = {
+ .handler = handle_continue,
+ .cmd = "c",
+ .cmd_startswith = 1,
+ .schema = "L0"
+ };
+ cmd_parser = &continue_cmd_desc;
}
- s->signal = 0;
- gdb_continue(s);
- return RS_IDLE;
+ break;
case 'C':
s->signal = gdb_signal_to_target (strtoul(p, (char **)&p, 16));
if (s->signal == -1)
--
2.20.1
- [Qemu-devel] [PULL 00/52] testing, gdbstub and cputlb fixes, Alex Bennée, 2019/06/07
- [Qemu-devel] [PULL 04/52] tests/docker: Update the Fedora cross compile images to 30, Alex Bennée, 2019/06/07
- [Qemu-devel] [PULL 05/52] tests/docker: Update the Ubuntu image to 19.04, Alex Bennée, 2019/06/07
- [Qemu-devel] [PULL 09/52] tests/vm: Port basevm to Python 3, Alex Bennée, 2019/06/07
- [Qemu-devel] [PULL 08/52] tests/vm: Use python configured on build, Alex Bennée, 2019/06/07
- [Qemu-devel] [PULL 36/52] gdbstub: Implement continue (c pkt) with new infra,
Alex Bennée <=
- [Qemu-devel] [PULL 38/52] gdbstub: Implement set_thread (H pkt) with new infra, Alex Bennée, 2019/06/07
- [Qemu-devel] [PULL 01/52] editorconfig: add setting for shell scripts, Alex Bennée, 2019/06/07
- [Qemu-devel] [PULL 03/52] tests/docker: Update the Fedora image to Fedora 30, Alex Bennée, 2019/06/07
- [Qemu-devel] [PULL 06/52] .travis.yml: bump gcc sanitiser job to gcc-9, Alex Bennée, 2019/06/07
- [Qemu-devel] [PULL 02/52] qemu-io-cmds: use clock_gettime for benchmarking, Alex Bennée, 2019/06/07
- [Qemu-devel] [PULL 07/52] .travis.yml: add clang ubsan job, Alex Bennée, 2019/06/07
- [Qemu-devel] [PULL 10/52] tests/vm: Fix build-centos docker-based tests run, Alex Bennée, 2019/06/07
- [Qemu-devel] [PULL 11/52] tests/vm: Add missing variables on help, Alex Bennée, 2019/06/07
- [Qemu-devel] [PULL 17/52] tests/vm: proper guest shutdown, Alex Bennée, 2019/06/07
- [Qemu-devel] [PULL 42/52] gdbstub: Implement write memory (M pkt) with new infra, Alex Bennée, 2019/06/07