gdbstub: Implement follow-fork-mode child
Status from this message: Queued to gdbstub/next, thanks.
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest12 patches 4 repliesApplied
- v311 patches 12 repliesSuperseded
- v211 patches 0 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 3 patches | 5 replies | Superseded |
Patches in v4 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/12 | gdbstub: Support disablement in a multi-threaded processgdbstub/ | +15 | 0 replies | |
| 2/12 | {linux,bsd}-user: Introduce get_task_state()bsd-user/ bsd-user/ bsd-user/ +22 more | +87 | 2 replies | |
| 3/12 | {linux,bsd}-user: Update ts_tid after fork()bsd-user/ linux-user/ | +2 | 1 reply | |
| 4/12 | gdbstub: Introduce gdbserver_fork_start()bsd-user/ gdbstub/ include/ +1 more | +11 | 0 replies | |
| 5/12 | {linux,bsd}-user: Pass pid to fork_end()bsd-user/ bsd-user/ bsd-user/ +3 more | +14 | 0 replies | |
| 6/12 | {linux,bsd}-user: Pass pid to gdbserver_fork()bsd-user/ gdbstub/ include/ +1 more | +4 | 0 replies | |
| 7/12 | gdbstub: Call gdbserver_fork() both in parent and in childbsd-user/ gdbstub/ include/ +1 more | +8 | 0 replies | |
| 8/12 | gdbstub: Introduce gdb_handle_query_supported_user()gdbstub/ gdbstub/ gdbstub/ | +14 | 0 replies | |
| 9/12 | gdbstub: Introduce gdb_handle_set_thread_user()gdbstub/ gdbstub/ gdbstub/ | +15 | 0 replies | |
| 10/12 | gdbstub: Introduce gdb_handle_detach_user()gdbstub/ gdbstub/ gdbstub/ | +12 | 0 replies | |
| 11/12 | gdbstub: Implement follow-fork-mode childgdbstub/ | +210 | 0 replies | |
| 12/12 | tests/tcg: Add two follow-fork-mode teststests/ tests/ tests/ +1 more | +128 | 0 replies |
Reviews trailers per patch
8 of 12 patches have a Reviewed-by or Acked-by.
| Patch | Alex Bennée | Richard Henderson | Warner Losh |
|---|---|---|---|
| 1/12 | R-b | R-b | |
| 2/12 | R-b | R-b | |
| 3/12 | R-b | R-b | |
| 4/12 | R-b | ||
| 5/12 | R-b | R-b | |
| 6/12 | R-b | ||
| 7/12 | R-b | ||
| 8/12 | R-b | ||
| 9/12 | |||
| 10/12 | |||
| 11/12 | |||
| 12/12 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH v4 00/12] gdbstub: Implement follow-fork-mode child
v3: https://lists.gnu.org/archive/html/qemu-devel/2024-02/msg03142.html
v3 -> v4: Address the review comments, add R-bs.
Add the get_task_state() refactoring.
Keep passing CPUState to gdbserver_fork_end() for tb_flush(). Patches that need review: 02/12, 09/12-12/12.
v2: https://lists.gnu.org/archive/html/qemu-devel/2024-02/msg00810.html
v2 -> v3: Rebase on top of master.
Fix a typo in the 01/11 commit message.
v1: https://lists.gnu.org/archive/html/qemu-devel/2024-01/msg06646.html
v1 -> v2: Factor out a number of prep patches;
Add a state transition diagram comment (Alex). Improve a few comments;
Extend the ts_tid fix to bsd.
Hi,
I needed to debug a linux-user crash between fork() and exec() [1] and realized that gdbstub does not allow this. This series lifts this restriction (one still cannot debug past exec() though). Patches 1-10 are preliminary refactorings, patch 11 is the implementation, and patch 12 is the test.
[1] https://lists.gnu.org/archive/html/qemu-devel/2024-01/msg06424.html
Best regards,
Ilya
Ilya Leoshkevich (12):
gdbstub: Support disablement in a multi-threaded process {linux,bsd}-user: Introduce get_task_state() {linux,bsd}-user: Update ts_tid after fork()
gdbstub: Introduce gdbserver_fork_start() {linux,bsd}-user: Pass pid to fork_end() {linux,bsd}-user: Pass pid to gdbserver_fork()
gdbstub: Call gdbserver_fork() both in parent and in child
gdbstub: Introduce gdb_handle_query_supported_user()
gdbstub: Introduce gdb_handle_set_thread_user()
gdbstub: Introduce gdb_handle_detach_user()
gdbstub: Implement follow-fork-mode child tests/tcg: Add two follow-fork-mode tests
bsd-user/bsd-file.h | 2 +- bsd-user/freebsd/os-proc.h | 6 +- bsd-user/main.c | 9 +- bsd-user/qemu.h | 7 +- bsd-user/signal.c | 20 +- gdbstub/gdbstub.c | 29 ++- gdbstub/internals.h | 3 + gdbstub/user-target.c | 4 +- gdbstub/user.c | 244 +++++++++++++++++- include/gdbstub/user.h | 10 +- include/user/safe-syscall.h | 2 +- linux-user/aarch64/cpu_loop.c | 2 +- linux-user/arm/cpu_loop.c | 4 +- linux-user/arm/signal.c | 2 +- linux-user/cris/cpu_loop.c | 2 +- linux-user/elfload.c | 6 +- linux-user/hppa/signal.c | 2 +- linux-user/linuxload.c | 2 +- linux-user/m68k/cpu_loop.c | 2 +- linux-user/m68k/target_cpu.h | 2 +- linux-user/main.c | 8 +- linux-user/mips/cpu_loop.c | 2 +- linux-user/ppc/signal.c | 4 +- linux-user/qemu.h | 5 + linux-user/riscv/cpu_loop.c | 2 +- linux-user/signal-common.h | 2 +- linux-user/signal.c | 30 +-- linux-user/syscall.c | 32 +-- linux-user/user-internals.h | 2 +- linux-user/vm86.c | 18 +- linux-user/xtensa/signal.c | 2 +- plugins/api.c | 8 +- semihosting/arm-compat-semi.c | 8 +- tests/tcg/multiarch/Makefile.target | 17 +- tests/tcg/multiarch/follow-fork-mode.c | 56 ++++ .../gdbstub/follow-fork-mode-child.py | 40 +++ .../gdbstub/follow-fork-mode-parent.py | 16 ++ 37 files changed, 511 insertions(+), 101 deletions(-) create mode 100644 tests/tcg/multiarch/follow-fork-mode.c create mode 100644 tests/tcg/multiarch/gdbstub/follow-fork-mode-child.py create mode 100644 tests/tcg/multiarch/gdbstub/follow-fork-mode-parent.py
Signature · 1 line
2.43.2