[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [PATCH 05/15] gdbstub: add multiprocess support to 'sC' p
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [Qemu-arm] [PATCH 05/15] gdbstub: add multiprocess support to 'sC' packets |
Date: |
Fri, 7 Sep 2018 20:25:53 -0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 |
On 9/1/18 9:46 AM, Luc Michel wrote:
> Change the sC packet handling to support the multiprocess extension.
> Instead of returning the first thread, we return the first thread of the
> current process.
>
> Signed-off-by: Luc Michel <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
> ---
> gdbstub.c | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/gdbstub.c b/gdbstub.c
> index 2cb9cb6d97..c15250ce65 100644
> --- a/gdbstub.c
> +++ b/gdbstub.c
> @@ -1531,13 +1531,18 @@ static int gdb_handle_packet(GDBState *s, const char
> *line_buf)
> type = strtoul(p, (char **)&p, 16);
> sstep_flags = type;
> put_packet(s, "OK");
> break;
> } else if (strcmp(p,"C") == 0) {
> - /* "Current thread" remains vague in the spec, so always return
> - * the first CPU (gdb returns the first thread). */
> - put_packet(s, "QC1");
> + /* "Current thread" remains vague in the spec, so always return
> the
> + * first thread of the current process (gdb returns the first
> + * thread).
> + */
> + cpu = get_first_cpu_in_process(s, gdb_get_cpu_process(s,
> s->g_cpu));
> + snprintf(buf, sizeof(buf), "QC%s",
> + get_thread_id(s, cpu, thread_id, sizeof(thread_id)));
> + put_packet(s, buf);
> break;
> } else if (strcmp(p,"fThreadInfo") == 0) {
> s->query_cpu = first_cpu;
> goto report_cpuinfo;
> } else if (strcmp(p,"sThreadInfo") == 0) {
>
- [Qemu-arm] [PATCH 00/15] gdbstub: support for the multiprocess extension, Luc Michel, 2018/09/01
- [Qemu-arm] [PATCH 12/15] gdbstub: processes initialization on new peer connection, Luc Michel, 2018/09/01
- [Qemu-arm] [PATCH 07/15] gdbstub: add multiprocess support to Xfer:features:read:, Luc Michel, 2018/09/01
- [Qemu-arm] [PATCH 01/15] gdbstub: introduce GDB processes, Luc Michel, 2018/09/01
- [Qemu-arm] [PATCH 05/15] gdbstub: add multiprocess support to 'sC' packets, Luc Michel, 2018/09/01
- Re: [Qemu-arm] [PATCH 05/15] gdbstub: add multiprocess support to 'sC' packets,
Philippe Mathieu-Daudé <=
- [Qemu-arm] [PATCH 10/15] gdbstub: add support for extended mode packet, Luc Michel, 2018/09/01
- [Qemu-arm] [PATCH 11/15] gdbstub: add support for vAttach packets, Luc Michel, 2018/09/01
- [Qemu-arm] [PATCH 08/15] gdbstub: add multiprocess support to gdb_vm_state_change(), Luc Michel, 2018/09/01
- [Qemu-arm] [PATCH 04/15] gdbstub: add multiprocess support to vCont packets, Luc Michel, 2018/09/01
- [Qemu-arm] [PATCH 03/15] gdbstub: add multiprocess support to 'H' and 'T' packets, Luc Michel, 2018/09/01
- [Qemu-arm] [PATCH 02/15] gdbstub: add multiprocess support to '?' packets, Luc Michel, 2018/09/01
- [Qemu-arm] [PATCH 14/15] gdbstub: add multiprocess extension support, Luc Michel, 2018/09/01
- [Qemu-arm] [PATCH 09/15] gdbstub: add multiprocess support to 'D' packets, Luc Michel, 2018/09/01