public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "ssbssa at sourceware dot org" <sourceware-bugzilla@sourceware.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	[thread overview]
Message-ID: <bug-8841-4717-arnhkF4Bj2@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-8841-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=8841

Hannes Domani <ssbssa at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ssbssa at sourceware dot org

--- Comment #7 from Hannes Domani <ssbssa at sourceware dot org> ---
(In reply to Sourceware Commits from comment #6)
> The master branch has been updated by Yao Qi <qiyao@sourceware.org>:
> 
> https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;
> h=7eb895307f53af3435440d3fe67c0e4e679d99b2
> 
> commit 7eb895307f53af3435440d3fe67c0e4e679d99b2
> Author: Yao Qi <yao.qi@arm.com>
> Date:   Mon May 23 17:32:56 2016 +0100
> 
>     Skip unwritable frames in command "finish"
>     
>     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,
>     
>      (gdb) bt
>      #0  CT32B1_IRQHandler () at ../src/timer.c:67
>      #1  <signal handler called>
>      #2  main () at ../src/timer.c:127
>     
>     (gdb) info frame
>     Stack level 0, frame at 0x200ffa8:
>      pc = 0x4ec in CT32B1_IRQHandler (../src/timer.c:67); saved pc =
> 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
>     
>     (gdb) x/x 0xfffffff9
>     0xfffffff9:     Cannot access memory at address 0xfffffff9
>     
>     (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?)
>     
>     Warning:
>     Cannot insert hardware breakpoint 0.
>     Could not insert hardware breakpoints:
>     You may have requested too many hardware breakpoints/watchpoints.
>     
>     Command aborted.
>     
>     even some debug probe can't set hardware breakpoint on the magic
>     address too,
>     
>     (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?)
>     
>     Warning:
>     Cannot insert hardware breakpoint 2.
>     Could not insert hardware breakpoints:
>     You may have requested too many hardware breakpoints/watchpoints.
>     
>     Command aborted.
>     
>     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?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2024-01-14 14:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-8841-4717@http.sourceware.org/bugzilla/>
2012-03-04  8:03 ` kalvdans at gmail dot com
2012-03-04  8:10 ` jan.kratochvil at redhat dot com
2012-03-04 20:09 ` kalvdans at gmail dot com
2012-03-04 20:35 ` jan.kratochvil at redhat dot com
2015-04-16 20:13 ` sandra at codesourcery dot com
2024-01-14 14:31 ` ssbssa at sourceware dot org [this message]
2024-01-14 16:27 ` sandra.oss at frogsonice dot com

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-8841-4717-arnhkF4Bj2@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: link
Be 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).