[PATCH for-6.0 0/2] document gdbstub debugging of multicore machines

Peter Maydell posted 2 patches 3 years ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210325175023.13838-1-peter.maydell@linaro.org
docs/system/gdb.rst | 63 ++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 62 insertions(+), 1 deletion(-)
[PATCH for-6.0 0/2] document gdbstub debugging of multicore machines
Posted by Peter Maydell 3 years ago
The way gdb and our gdbstub handle multicore and multicluster
machines is not very obvious.  This patchset adds some documentation
of how to do it. In particular it gives the necessary runes
for how to get gdb to work with machines which have multiple
clusters of heterogenous CPUs (that's the sifive_u board, some
of the MPS2/MPS3 boards, and the Xilinx one).

I don't think there's any way for the stub to tell gdb
"I have 2 inferiors, attach to both of them", unfortunately,
so the user has to manually connect to them. (We should talk
to the gdb folks to confirm that and perhaps suggest protocol
enhancements. For 6.0, at least let's document the current state
of affairs.)

(We noticed the lack of docs as part of
https://bugs.launchpad.net/qemu/+bug/1921092)

thanks
-- PMM

Peter Maydell (2):
  docs/system/gdb.rst: Add some more heading structure
  docs/system/gdb.rst: Document how to debug multicore machines

 docs/system/gdb.rst | 63 ++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 62 insertions(+), 1 deletion(-)

-- 
2.20.1


Re: [PATCH for-6.0 0/2] document gdbstub debugging of multicore machines
Posted by Philippe Mathieu-Daudé 3 years ago
On 3/25/21 6:50 PM, Peter Maydell wrote:

> Peter Maydell (2):
>   docs/system/gdb.rst: Add some more heading structure
>   docs/system/gdb.rst: Document how to debug multicore machines
> 
>  docs/system/gdb.rst | 63 ++++++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 62 insertions(+), 1 deletion(-)
> 

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Re: [PATCH for-6.0 0/2] document gdbstub debugging of multicore machines
Posted by Alex Bennée 3 years ago
Peter Maydell <peter.maydell@linaro.org> writes:

> The way gdb and our gdbstub handle multicore and multicluster
> machines is not very obvious.  This patchset adds some documentation
> of how to do it. In particular it gives the necessary runes
> for how to get gdb to work with machines which have multiple
> clusters of heterogenous CPUs (that's the sifive_u board, some
> of the MPS2/MPS3 boards, and the Xilinx one).
>
> I don't think there's any way for the stub to tell gdb
> "I have 2 inferiors, attach to both of them", unfortunately,
> so the user has to manually connect to them. (We should talk
> to the gdb folks to confirm that and perhaps suggest protocol
> enhancements. For 6.0, at least let's document the current state
> of affairs.)

Queued to for-6.0/fixes-for-rc2, thanks.

-- 
Alex Bennée