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:49:44 +0000 [thread overview] Message-ID: <bug-31071-4717-RImQNf345r@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 #1 from Tom de Vries <vries at gcc dot gnu.org> --- Note the special execve handling in aarch64_linux_get_syscall_number: ... /* On exit from a successful execve, we will be in a new process and all the registers will be cleared - x0 to x30 will be 0, except for a 1 in x7. This function will only ever get called when stopped at the entry or exit of a syscall, so by checking for 0 in x0 (arg0/retval), x1 (arg1), x8 (syscall), x29 (FP) and x30 (LR) we can infer: 1) Either inferior is at exit from successful execve. 2) Or inferior is at entry to a call to io_setup with invalid arguments and a corrupted FP and LR. It should be safe enough to assume case 1. */ if (ret == 0) { LONGEST x1 = -1, fp = -1, lr = -1; regs->cooked_read (AARCH64_X0_REGNUM + 1, &x1); regs->cooked_read (AARCH64_FP_REGNUM, &fp); regs->cooked_read (AARCH64_LR_REGNUM, &lr); if (x1 == 0 && fp ==0 && lr == 0) return aarch64_sys_execve; } ... -- 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:49 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 ` vries at gcc dot gnu.org [this message] 2023-11-16 9:53 ` [Bug tdep/31071] " vries at gcc dot gnu.org 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-RImQNf345r@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).