From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CF0893858C2A; Thu, 16 Nov 2023 09:49:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CF0893858C2A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1700128187; bh=h8y+1TygaGbH5sQb3U890zA2gEPAhdPE4xRLiH+m3jU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=UknTnyLRyhBc22st5rjssitOloL9wmqiJnKa5H2Isd668vXYJZMdyedomc9chXVkN I3rYAu6bMr9kggcb4hGdy/LDKYmyLBuQ9ouE968pVqTrkj0hg+xirvoRpiZ6s7SCwT w1/B1f3bE3U+xx4kKCIsLZSCbh8E/mdPAxW3kkG0= From: "vries at gcc dot gnu.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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: tdep X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31071 --- Comment #1 from Tom de Vries --- 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=20=20 registers will be cleared - x0 to x30 will be 0, except for a 1 in x7.= =20=20=20=20=20 This function will only ever get called when stopped at the entry or e= xit=20=20 of a syscall, so by checking for 0 in x0 (arg0/retval), x1 (arg1), x8= =20=20=20=20=20=20 (syscall), x29 (FP) and x30 (LR) we can infer:=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 1) Either inferior is at exit from successful execve.=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 2) Or inferior is at entry to a call to io_setup with invalid arguments and=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 a corrupted FP and LR.=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20 It should be safe enough to assume case 1. */ if (ret =3D=3D 0) { LONGEST x1 =3D -1, fp =3D -1, lr =3D -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 =3D=3D 0 && fp =3D=3D0 && lr =3D=3D 0) return aarch64_sys_execve; } ... --=20 You are receiving this mail because: You are on the CC list for the bug.=