public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug tdep/31071] [gdb/tdep, arm] FAIL: gdb.base/catch-syscall.exp: execve: syscall execve has returned Date: Thu, 16 Nov 2023 09:53:05 +0000 [thread overview] Message-ID: <bug-31071-4717-vY2rVsEb42@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-31071-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=31071 --- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> --- This demonstrator patch makes the test-case pass: ... diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c index dfa816990ff..74c78166403 100644 --- a/gdb/arm-linux-tdep.c +++ b/gdb/arm-linux-tdep.c @@ -845,8 +845,12 @@ arm_linux_get_syscall_number (struct gdbarch *gdbarch, /* PC gets incremented before the syscall-stop, so read the previous instruction. */ - unsigned long this_instr = - read_memory_unsigned_integer (pc - 4, 4, byte_order_for_code); + unsigned long this_instr; + + ULONGEST val; + if (!safe_read_memory_unsigned_integer (pc - 4, 4, byte_order_for_code, &val)) + return 11; + this_instr = val; unsigned long svc_operand = (0x00ffffff & this_instr); ... -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2023-11-16 9:53 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-11-16 9:29 [Bug tdep/31071] New: " vries at gcc dot gnu.org 2023-11-16 9:49 ` [Bug tdep/31071] " vries at gcc dot gnu.org 2023-11-16 9:53 ` vries at gcc dot gnu.org [this message] 2023-11-16 10:04 ` vries at gcc dot gnu.org 2023-11-16 10:07 ` vries at gcc dot gnu.org 2023-11-16 10:07 ` vries at gcc dot gnu.org 2023-11-16 10:31 ` luis.machado at arm dot com 2023-11-16 10:32 ` vries at gcc dot gnu.org 2023-11-16 11:57 ` luis.machado at arm dot com 2023-11-16 17:41 ` vries at gcc dot gnu.org 2023-11-21 10:42 ` cvs-commit at gcc dot gnu.org 2023-11-21 10:43 ` vries at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-31071-4717-vY2rVsEb42@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).