Skip to content

gdbstub: Implement catching syscalls

Ilya Leoshkevich qemu-devel 3 versions – Applied

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

  1. v3 Latest5 patches 1 replyApplied
  2. v22 patches 3 repliesSuperseded
  3. v12 patches 0 repliesSuperseded

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/5gdbstub: Expose TARGET_SIGTRAP in a target-agnostic waygdbstub/internals.h gdbstub/user-target.c+6 -00 replies
2/5gdbstub: Allow specifying a reason in stop packetsgdbstub/user.c include/gdbstub/user.h+18 -30 replies
3/5gdbstub: Add syscall entry/return hooksgdbstub/user.c include/gdbstub/user.h include/user/syscall-trace.h+26 -20 replies
4/5gdbstub: Implement catching syscallsgdbstub/gdbstub.c gdbstub/internals.h gdbstub/user.c+105 -00 replies
5/5tests/tcg: Add the syscall catchpoint gdbstub testtests/tcg/multiarch/Makefile.target tests/tcg/multiarch/catch-syscalls.c tests/tcg/multiarch/gdbstub/catch-syscalls.py+113 -10 replies

Reviews trailers per patch

1 of 5 patches has a Reviewed-by or Acked-by.

PatchAlex Bennée
1/5
2/5
3/5
4/5
5/5R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/5] gdbstub: Implement catching syscalls

v2: https://lists.gnu.org/archive/html/qemu-devel/2024-01/msg02980.html
v2 -> v3: Simplify the catchpoint state by making "don't catch" a
subset of "catch some".
Factor out several prep patches;
Don't use snprintf;
Add some comments (Alex).

v1: https://lists.gnu.org/archive/html/qemu-devel/2024-01/msg02911.html
v1 -> v2: Avoid touching the system gdbstub.
Advertise QCatchSyscalls+ only on Linux.

Hi,

I noticed that GDB's "catch syscall" does not work with qemu-user. This series adds the missing bits in [1/2] and a test in [2/2]. I'm basing this on my other series, since it contains useful gdbstub test refactorings.

Best regards,
Ilya

Ilya Leoshkevich (5):
gdbstub: Expose TARGET_SIGTRAP in a target-agnostic way
gdbstub: Allow specifying a reason in stop packets
gdbstub: Add syscall entry/return hooks
gdbstub: Implement catching syscalls tests/tcg: Add the syscall catchpoint gdbstub test

 gdbstub/gdbstub.c                             |   9 ++
 gdbstub/internals.h                           |   2 +
 gdbstub/user-target.c                         |   5 +
 gdbstub/user.c                                | 108 +++++++++++++++++-
 include/gdbstub/user.h                        |  29 ++++-
 include/user/syscall-trace.h                  |   7 +-
 tests/tcg/multiarch/Makefile.target           |  10 +-
 tests/tcg/multiarch/catch-syscalls.c          |  51 +++++++++
 tests/tcg/multiarch/gdbstub/catch-syscalls.py |  53 +++++++++
 9 files changed, 268 insertions(+), 6 deletions(-)
 create mode 100644 tests/tcg/multiarch/catch-syscalls.c
 create mode 100644 tests/tcg/multiarch/gdbstub/catch-syscalls.py
Signature · 1 line
2.43.0