From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 94E253858D3C; Sun, 14 Jan 2024 14:31:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 94E253858D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1705242681; bh=suCCqOk5iTs9LYjspfD+77h1Bz7+8nBpsubXlA3Az9E=; h=From:To:Subject:Date:In-Reply-To:References:From; b=fR/ylKh2qPNcMUt2ltg7HFONEeglpb/vHHEcqrFtw+c9F16+HUeK0GDJYxYImMG9Y n0hwBKrTTGXlQ00KbtXU+FXeQKeiEcae1oUVlmgo7oM9pMdLUe3EMamOdNSNd1iOy1 /dplxSSGvhYEHrKEgfMTXq+ESAuaIBxw3K197UVU= From: "ssbssa at sourceware dot org" To: gdb-prs@sourceware.org Subject: [Bug external/8841] Can not set breakpoints in the vsyscall page Date: Sun, 14 Jan 2024 14:31:20 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: external X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ssbssa at sourceware dot org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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=3D8841 Hannes Domani changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ssbssa at sourceware dot o= rg --- Comment #7 from Hannes Domani --- (In reply to Sourceware Commits from comment #6) > The master branch has been updated by Yao Qi : >=20 > https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git; > h=3D7eb895307f53af3435440d3fe67c0e4e679d99b2 >=20 > commit 7eb895307f53af3435440d3fe67c0e4e679d99b2 > Author: Yao Qi > Date: Mon May 23 17:32:56 2016 +0100 >=20 > Skip unwritable frames in command "finish" >=20=20=20=20=20 > Nowadays, GDB can't insert breakpoint on the return address of the > exception handler on ARM M-profile, because the address is a magic > one 0xfffffff9, >=20=20=20=20=20 > (gdb) bt > #0 CT32B1_IRQHandler () at ../src/timer.c:67 > #1 > #2 main () at ../src/timer.c:127 >=20=20=20=20=20 > (gdb) info frame > Stack level 0, frame at 0x200ffa8: > pc =3D 0x4ec in CT32B1_IRQHandler (../src/timer.c:67); saved pc =3D > 0xfffffff9 > called by frame at 0x200ffc8 > source language c. > Arglist at 0x200ffa0, args: > Locals at 0x200ffa0, Previous frame's sp is 0x200ffa8 > Saved registers: > r7 at 0x200ffa0, lr at 0x200ffa4 >=20=20=20=20=20 > (gdb) x/x 0xfffffff9 > 0xfffffff9: Cannot access memory at address 0xfffffff9 >=20=20=20=20=20 > (gdb) finish > Run till exit from #0 CT32B1_IRQHandler () at ../src/timer.c:67 > Ed:15: Target error from Set break/watch: Et:96: Pseudo-address > (0xFFFFFFxx) for EXC_RETURN is invalid (GDB error?) >=20=20=20=20=20 > Warning: > Cannot insert hardware breakpoint 0. > Could not insert hardware breakpoints: > You may have requested too many hardware breakpoints/watchpoints. >=20=20=20=20=20 > Command aborted. >=20=20=20=20=20 > even some debug probe can't set hardware breakpoint on the magic > address too, >=20=20=20=20=20 > (gdb) hbreak *0xfffffff9 > Hardware assisted breakpoint 2 at 0xfffffff9 > (gdb) c > Continuing. > Ed:15: Target error from Set break/watch: Et:96: Pseudo-address > (0xFFFFFFxx) for EXC_RETURN is invalid (GDB error?) >=20=20=20=20=20 > Warning: > Cannot insert hardware breakpoint 2. > Could not insert hardware breakpoints: > You may have requested too many hardware breakpoints/watchpoints. >=20=20=20=20=20 > Command aborted. >=20=20=20=20=20 > The problem described above is quite similar to PR 8841, in which GDB > can't set breakpoint on signal trampoline, which is mapped to a read-= only > page by kernel. The rationale of this patch is to skip "unwritable" > frames when looking for caller frames in command "finish", and a new > gdbarch method code_of_frame_writable is added. This patch fixes > the problem on ARM cortex-m target, but it can be used to fix > PR 8841 too. Can this be closed? --=20 You are receiving this mail because: You are on the CC list for the bug.=