From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6378B3858416; Thu, 16 Nov 2023 09:29:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6378B3858416 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1700126978; bh=zfgYVSg6B7/VaV68pp6qsfzmqIelaD4P+MOT2e9R1DU=; h=From:To:Subject:Date:From; b=m/RpMqtzwQgJHY01H69s/fp8r0sd3Vs6cydIWh366qxqxzeVA4cQ98tUs0MNTXXY4 oIfR9GRDP9h+3O9xukq5bfjCoc2Cqu7Ryv5OySpoAv3btdfQw9XqG1kcmoF+DVWtD7 aNHx0Dy+6xbN8WOI93UoDaZu2viwkqkFT2oRIfvA= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug tdep/31071] New: [gdb/tdep, arm] FAIL: gdb.base/catch-syscall.exp: execve: syscall execve has returned Date: Thu, 16 Nov 2023 09:29:37 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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 Bug ID: 31071 Summary: [gdb/tdep, arm] FAIL: gdb.base/catch-syscall.exp: execve: syscall execve has returned Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: tdep Assignee: unassigned at sourceware dot org Reporter: vries at gcc dot gnu.org Target Milestone: --- On a pinebook (aarch64 linux kernel, 32-bit user land) I run into: ... (gdb) PASS: gdb.base/catch-syscall.exp: execve: syscall(s) execve appears in 'info breakpoints' continue^M Continuing.^M ^M Catchpoint 18 (call to syscall execve), 0xf7726318 in execve () from /lib/arm-linux-gnueabihf/libc.so.6^M (gdb) PASS: gdb.base/catch-syscall.exp: execve: program has called execve continue^M Continuing.^M process 32392 is executing new program: /home/rock/gdb/build/gdb/testsuite/outputs/gdb.base/catch-syscall/catch-sys= call^M Cannot access memory at address 0xf77c6a7c^M (gdb) FAIL: gdb.base/catch-syscall.exp: execve: syscall execve has returned ... The memory error is thrown by arm_linux_get_syscall_number, when doing: ... /* PC gets incremented before the syscall-stop, so read the=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20 previous instruction. */ unsigned long this_instr =3D read_memory_unsigned_integer (pc - 4, 4, byte_order_for_code); ... The reason is that we're stopped at the syscall exit of syscall execve, and= the pc is at the first insn of the new exec, which also happens to be the first insn in the code segment, so consequently we cannot read the previous insn. --=20 You are receiving this mail because: You are on the CC list for the bug.=