public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "tomas.vanek at fbl dot cz" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug breakpoints/28683] advance/until commands do not handle SIGTRAMP_FRAME on ARM Cortex-M
Date: Fri, 14 Oct 2022 15:02:13 +0000	[thread overview]
Message-ID: <bug-28683-4717-UPPRjJY4WR@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-28683-4717@http.sourceware.org/bugzilla/>

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

--- Comment #5 from tomas.vanek at fbl dot cz ---
GNU gdb (GDB) 13.0.50.20221012-git has the same problem.

The proposed patch depends on the lockup unwinder
https://sourceware.org/bugzilla/attachment.cgi?id=13853

Without it the caller frame is missdetected as arm stub @ 0xfffffffe
and gdb wants to set temporary breakpoint at that address.

(gdb) adv main
[frame] get_prev_frame_always_1: enter
  [frame] get_prev_frame_always_1: this_frame=0
  [frame] get_prev_frame_raw:   ->
{level=1,type=<unknown>,unwinder=<unknown>,pc=<unknown>,id=<not
computed>,func=<unknown>}
  [frame] compute_frame_id: enter
    [frame] compute_frame_id: fi=1
    [frame] frame_unwind_find_by_frame: enter
      [frame] frame_unwind_find_by_frame: this_frame=1
      [frame] frame_unwind_arch: next_frame=0 -> armv7e-m
      [frame] frame_unwind_try_unwinder: trying unwinder "dummy"
      [frame] frame_unwind_try_unwinder: no
      [frame] frame_unwind_try_unwinder: trying unwinder "dwarf2 tailcall"
      [frame] frame_unwind_try_unwinder: no
      [frame] frame_unwind_try_unwinder: trying unwinder "inline"
      [frame] frame_unwind_register_value: enter
        [frame] frame_unwind_register_value: frame=0, regnum=15(pc)
        [frame] frame_unwind_register_value: enter
          [frame] frame_unwind_register_value: frame=0, regnum=14(lr)
          [frame] frame_id_p:
l={stack=<sentinel>,!code,special=0x0000000000000000} -> 1
          [frame] frame_id_p:
l={stack=<sentinel>,!code,special=0x0000000000000000} -> 1
          [frame] operator==:
l={stack=<sentinel>,!code,special=0x0000000000000000},
r={stack=<sentinel>,!code,special=0x0000000000000000} -> 1
          [frame] frame_unwind_register_value: enter
            [frame] frame_unwind_register_value: frame=-1, regnum=14(lr)
            [frame] frame_unwind_register_value:   -> register=14
bytes=[ffffffff]
          [frame] frame_unwind_register_value: exit
          [frame] frame_id_p:
l={stack=<sentinel>,!code,special=0x0000000000000000} -> 1
          [frame] operator==:
l={stack=<sentinel>,!code,special=0x0000000000000000},
r={stack=<sentinel>,!code,special=0x0000000000000000} -> 1
          [frame] get_prev_frame_always_1: enter
            [frame] get_prev_frame_always_1: this_frame=-1
            [frame] get_prev_frame_always_1:   ->
{level=0,type=NORMAL_FRAME,unwinder="arm
prologue",pc=0x4e2,id={stack=0x20010000,code=0x00000000000004e0,!special},func=0x4e0}
// cached
          [frame] get_prev_frame_always_1: exit
          [frame] value_fetch_lazy_register: (frame=0, regnum=14(lr), ...) ->
register=14 bytes=[ffffffff]
          [frame] frame_unwind_register_value:   -> register=14
bytes=[ffffffff]
        [frame] frame_unwind_register_value: exit
        [frame] frame_unwind_register_value:   -> computed bytes=[feffffff]
      [frame] frame_unwind_register_value: exit
      [frame] frame_unwind_pc: this_frame=0 -> 0xfffffffe
      [frame] frame_unwind_try_unwinder: no
      [frame] frame_unwind_try_unwinder: trying unwinder "jit"
      [frame] frame_unwind_try_unwinder: no
      [frame] frame_unwind_try_unwinder: trying unwinder "arm m exception"
      [frame] frame_unwind_try_unwinder: no
      [frame] frame_unwind_try_unwinder: trying unwinder "arm stub"
      [frame] frame_unwind_try_unwinder: yes
    [frame] frame_unwind_find_by_frame: exit
    [frame] frame_unwind_register_value: enter
      [frame] frame_unwind_register_value: frame=0, regnum=13(sp)
      [frame] frame_unwind_register_value:   -> computed bytes=[00000120]
    [frame] frame_unwind_register_value: exit
    [frame] frame_unwind_register_value: enter
      [frame] frame_unwind_register_value: frame=0, regnum=91(msp)
      [frame] frame_unwind_register_value:   -> computed bytes=[00000120]
    [frame] frame_unwind_register_value: exit
    [frame] frame_unwind_register_value: enter
      [frame] frame_unwind_register_value: frame=0, regnum=92(psp)
      [frame] frame_unwind_register_value:   -> computed bytes=[00000000]
    [frame] frame_unwind_register_value: exit
    [frame] frame_unwind_register_value: enter
      [frame] frame_unwind_register_value: frame=0, regnum=13(sp)
      [frame] frame_unwind_register_value:   -> computed bytes=[00000120]
    [frame] frame_unwind_register_value: exit
    [frame] frame_id_p: l={stack=0x20010000,code=0x00000000fffffffe,!special}
-> 1
    [frame] compute_frame_id:   ->
{stack=0x20010000,code=0x00000000fffffffe,!special}
  [frame] compute_frame_id: exit
[frame] get_prev_frame_always_1: exit
[frame] frame_id_p: l={stack=0x20010000,code=0x00000000fffffffe,!special} -> 1
[frame] frame_id_p: l={stack=0x20010000,code=0x00000000fffffffe,!special} -> 1
[frame] frame_id_p: l={!stack,!code,!special} -> 0
[frame] frame_id_p: l={!stack,!code,!special} -> 0
[frame] frame_id_p: l={!stack,!code,!special} -> 0
[frame] frame_id_p: l={!stack,!code,!special} -> 0
[frame] frame_id_p: l={!stack,!code,!special} -> 0
[frame] frame_id_p: l={!stack,!code,!special} -> 0
[frame] frame_id_p: l={!stack,!code,!special} -> 0
[frame] frame_id_p: l={!stack,!code,!special} -> 0
Note: automatically using hardware breakpoints for read-only addresses.
[frame] frame_id_p: l={!stack,!code,!special} -> 0
Warning:
Cannot insert breakpoint 0.
Cannot access memory at address 0xfffffffe

Command aborted.

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

  parent reply	other threads:[~2022-10-14 15:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-10 20:28 [Bug breakpoints/28683] New: " tomas.vanek at fbl dot cz
2021-12-10 20:51 ` [Bug breakpoints/28683] " tomas.vanek at fbl dot cz
2021-12-14 17:27 ` tomas.vanek at fbl dot cz
2022-10-13  9:21 ` luis.machado at arm dot com
2022-10-14 11:26 ` tomas.vanek at fbl dot cz
2022-10-14 15:02 ` tomas.vanek at fbl dot cz [this message]
2022-10-16 15:28 ` tomas.vanek at fbl dot cz
2022-10-17  7:14 ` luis.machado at arm dot com
2022-10-21 10:02 ` luis.machado at arm dot com
2023-01-10 22:30 ` tomas.vanek at fbl dot cz
2023-01-10 22:32 ` tomas.vanek at fbl dot cz
2023-01-10 22:37 ` tomas.vanek at fbl dot cz

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-28683-4717-UPPRjJY4WR@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).