[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 04/20] gdbstub: Implement continue (c pkt) wi
From: |
Alex Bennée |
Subject: |
Re: [Qemu-devel] [PATCH v3 04/20] gdbstub: Implement continue (c pkt) with new infra |
Date: |
Thu, 25 Apr 2019 15:51:21 +0100 |
User-agent: |
mu4e 1.3.1; emacs 26.1 |
address@hidden writes:
> From: Jon Doron <address@hidden>
>
> Signed-off-by: Jon Doron <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
> ---
> gdbstub.c | 25 +++++++++++++++++++------
> 1 file changed, 19 insertions(+), 6 deletions(-)
>
> diff --git a/gdbstub.c b/gdbstub.c
> index 435b492b4f..a6d5acd6f0 100644
> --- a/gdbstub.c
> +++ b/gdbstub.c
> @@ -1538,6 +1538,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;
> @@ -1573,13 +1583,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 GdbCmdParseEntry continue_cmd_desc = {
> + .handler = handle_continue,
> + .cmd = "c",
> + .cmd_startswith = 1,
> + .schema = "L0"
> + };
> + process_string_cmd(s, NULL, line_buf, &continue_cmd_desc, 1);
> }
> - 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)
--
Alex Bennée
- [Qemu-devel] [PATCH v3 05/20] gdbstub: Implement continue with signal (C pkt) with new infra, (continued)
- [Qemu-devel] [PATCH v3 05/20] gdbstub: Implement continue with signal (C pkt) with new infra, arilou, 2019/04/24
- [Qemu-devel] [PATCH v3 08/20] gdbstub: Implement remove breakpoint (z pkt) with new infra, arilou, 2019/04/24
- [Qemu-devel] [PATCH v3 02/20] gdbstub: Implement deatch (D pkt) with new infra, arilou, 2019/04/24
- [Qemu-devel] [PATCH v3 13/20] gdbstub: Implement write all registers (G pkt) with new infra, arilou, 2019/04/24
- [Qemu-devel] [PATCH v3 12/20] gdbstub: Implement read memory (m pkt) with new infra, arilou, 2019/04/24
- [Qemu-devel] [PATCH v3 11/20] gdbstub: Implement write memory (M pkt) with new infra, arilou, 2019/04/24
- [Qemu-devel] [PATCH v3 09/20] gdbstub: Implement set register (P pkt) with new infra, arilou, 2019/04/24
- [Qemu-devel] [PATCH v3 04/20] gdbstub: Implement continue (c pkt) with new infra, arilou, 2019/04/24
- Re: [Qemu-devel] [PATCH v3 04/20] gdbstub: Implement continue (c pkt) with new infra,
Alex Bennée <=
- Re: [Qemu-devel] [PATCH v3 01/20] gdbstub: Add infrastructure to parse cmd packets, Richard Henderson, 2019/04/24
- Re: [Qemu-devel] [PATCH v3 01/20] gdbstub: Add infrastructure to parse cmd packets, Alex Bennée, 2019/04/25
- Re: [Qemu-devel] [PATCH v3 01/20] gdbstub: Add infrastructure to parse cmd packets, Alex Bennée, 2019/04/25