Message ID | 20181207090135.7651-1-luc.michel@greensocs.com |
---|---|
Headers | show |
Series | gdbstub: support for the multiprocess extension | expand |
Hi all, What do you think of this re-roll? Is it in good shape for upstreaming? Thanks!
On Mon, 17 Dec 2018 at 08:23, Luc Michel <luc.michel@greensocs.com> wrote: > > Hi all, > > What do you think of this re-roll? Is it in good shape for upstreaming? It's on my list to look at still, but I'm off work til January now, I'm afraid. thanks -- PMM
On Fri, 7 Dec 2018 at 09:01, Luc Michel <luc.michel@greensocs.com> wrote: > This series adds support for the multiprocess extension of the GDB > remote protocol in the QEMU GDB stub. > > This extension is useful to split QEMU emulated CPUs in different > processes from the point of view of the GDB client. It adds the > possibility to debug different kind of processors (e.g. an AArch64 and > an ARMv7 CPU) at the same time (it is not possible otherwise since GDB > expects an SMP view at the thread granularity. I've applied this patchset to target-arm.next, thanks. (I fixed up a few checkpatch nits about block comment style.) > To test this patchset, you can use the following commands: > > (Note that this requires a recent enough GDB, I think GDB 7.2 is OK. > Also, it must be compiled to support both ARM and AArch64 architectures) > > Run QEMU: (-smp 6 in xlnx-zcu102 enables both cortex-a53 and cortex-r5 > CPUs) > > qemu-system-aarch64 -M xlnx-zcu102 -gdb tcp::1234 -S -smp 6 > > Run the following commands in GDB: > > target extended :1234 > add-inferior > inferior 2 > attach 2 > info threads This seems a bit clumsy -- is it just the limitations of gdb here? I was expecting that just connecting to the remote would cause gdb to interrogate it and attach to all the inferior processes that it had. thanks -- PMM
On 1/4/19 4:12 PM, Peter Maydell wrote: > On Fri, 7 Dec 2018 at 09:01, Luc Michel <luc.michel@greensocs.com> wrote: >> This series adds support for the multiprocess extension of the GDB >> remote protocol in the QEMU GDB stub. >> >> This extension is useful to split QEMU emulated CPUs in different >> processes from the point of view of the GDB client. It adds the >> possibility to debug different kind of processors (e.g. an AArch64 and >> an ARMv7 CPU) at the same time (it is not possible otherwise since GDB >> expects an SMP view at the thread granularity. > > I've applied this patchset to target-arm.next, thanks. > (I fixed up a few checkpatch nits about block comment style.) Thanks! > >> To test this patchset, you can use the following commands: >> >> (Note that this requires a recent enough GDB, I think GDB 7.2 is OK. >> Also, it must be compiled to support both ARM and AArch64 architectures) >> >> Run QEMU: (-smp 6 in xlnx-zcu102 enables both cortex-a53 and cortex-r5 >> CPUs) >> >> qemu-system-aarch64 -M xlnx-zcu102 -gdb tcp::1234 -S -smp 6 >> >> Run the following commands in GDB: >> >> target extended :1234 >> add-inferior >> inferior 2 >> attach 2 >> info threads > > This seems a bit clumsy -- is it just the limitations of > gdb here? I was expecting that just connecting to the > remote would cause gdb to interrogate it and attach to > all the inferior processes that it had. AFAIK this is a "limitation" of GDB. In QEMU context it seems like a limitation, but when you are connecting to a remote gdbserver that exposes all the processes currently running on an OS, you probably don't want to attach them all automatically. Luc > > thanks > -- PMM >