Browse Source
- fix the over rebuilding of test VMs - support Xfer:siginfo:read in gdbstub - fix double close() in gdbstub -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEZoWumedRZ7yvyN81+9DbCVqeKkQFAmXxkb0ACgkQ+9DbCVqe KkSw9wf+K+3kJYaZ2unEFku3Y6f4Z9XkrZCsFQFVNIJQgpYVc6peQyLUB1pZwzZc yoQhmTIgej16iRZc7gEcJhFl2zlX2vulE/m+wiaR0Chv3E2r510AGn4aWl+GLB9+ /WduHaz1NobPW4JWaarxespa84Re8QZQgqkHX4nwYd++FW63E4uxydL4F1nmSNca eTA6RwS48h4wqPzHBX72hYTRUnYrDUSSGCGUDzK3NHumuPi+AQ77GLRMO0MTYFfy hWriapogCmghY+Xtn++eUIwDyh1CCnUT6Ntf5Qj06bZ+f6eaTwINM8QWhj9mxYX+ 5/F5Q4JJDqRPYw/hF4wYXRsiZxTYFw== =BOWW -----END PGP SIGNATURE----- Merge tag 'pull-maintainer-final-130324-1' of https://gitlab.com/stsquad/qemu into staging final updates for 9.0 (testing, gdbstub): - fix the over rebuilding of test VMs - support Xfer:siginfo:read in gdbstub - fix double close() in gdbstub # -----BEGIN PGP SIGNATURE----- # # iQEzBAABCgAdFiEEZoWumedRZ7yvyN81+9DbCVqeKkQFAmXxkb0ACgkQ+9DbCVqe # KkSw9wf+K+3kJYaZ2unEFku3Y6f4Z9XkrZCsFQFVNIJQgpYVc6peQyLUB1pZwzZc # yoQhmTIgej16iRZc7gEcJhFl2zlX2vulE/m+wiaR0Chv3E2r510AGn4aWl+GLB9+ # /WduHaz1NobPW4JWaarxespa84Re8QZQgqkHX4nwYd++FW63E4uxydL4F1nmSNca # eTA6RwS48h4wqPzHBX72hYTRUnYrDUSSGCGUDzK3NHumuPi+AQ77GLRMO0MTYFfy # hWriapogCmghY+Xtn++eUIwDyh1CCnUT6Ntf5Qj06bZ+f6eaTwINM8QWhj9mxYX+ # 5/F5Q4JJDqRPYw/hF4wYXRsiZxTYFw== # =BOWW # -----END PGP SIGNATURE----- # gpg: Signature made Wed 13 Mar 2024 11:45:01 GMT # gpg: using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44 # gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" [full] # Primary key fingerprint: 6685 AE99 E751 67BC AFC8 DF35 FBD0 DB09 5A9E 2A44 * tag 'pull-maintainer-final-130324-1' of https://gitlab.com/stsquad/qemu: gdbstub: Fix double close() of the follow-fork-mode socket tests/tcg: Add multiarch test for Xfer:siginfo:read stub gdbstub: Add Xfer:siginfo:read stub gdbstub: Save target's siginfo linux-user: Move tswap_siginfo out of target code gdbstub: Rename back gdb_handlesig tests/vm: ensure we build everything by default Signed-off-by: Peter Maydell <peter.maydell@linaro.org>pull/264/head
31 changed files with 149 additions and 52 deletions
@ -0,0 +1,26 @@ |
|||
from __future__ import print_function |
|||
# |
|||
# Test gdbstub Xfer:siginfo:read stub. |
|||
# |
|||
# The test runs a binary that causes a SIGSEGV and then looks for additional |
|||
# info about the signal through printing GDB's '$_siginfo' special variable, |
|||
# which sends a Xfer:siginfo:read query to the gdbstub. |
|||
# |
|||
# The binary causes a SIGSEGV at dereferencing a pointer with value 0xdeadbeef, |
|||
# so the test looks for and checks if this address is correctly reported by the |
|||
# gdbstub. |
|||
# |
|||
# This is launched via tests/guest-debug/run-test.py |
|||
# |
|||
|
|||
import gdb |
|||
from test_gdbstub import main, report |
|||
|
|||
def run_test(): |
|||
"Run through the test" |
|||
|
|||
gdb.execute("continue", False, True) |
|||
resp = gdb.execute("print/x $_siginfo", False, True) |
|||
report(resp.find("si_addr = 0xdeadbeef"), "Found fault address.") |
|||
|
|||
main(run_test) |
|||
@ -0,0 +1,14 @@ |
|||
#include <stdio.h> |
|||
#include <string.h> |
|||
|
|||
/* Cause a segfault for testing purposes. */ |
|||
|
|||
int main(int argc, char *argv[]) |
|||
{ |
|||
int *ptr = (void *)0xdeadbeef; |
|||
|
|||
if (argc == 2 && strcmp(argv[1], "-s") == 0) { |
|||
/* Cause segfault. */ |
|||
printf("%d\n", *ptr); |
|||
} |
|||
} |
|||
Loading…
Reference in new issue