public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug python/31437] New: [gdb/python] Unavailable register breaks python unwinding
@ 2024-03-01 12:24 vries at gcc dot gnu.org
  2024-03-01 12:27 ` [Bug python/31437] " vries at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: vries at gcc dot gnu.org @ 2024-03-01 12:24 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 31437
           Summary: [gdb/python] Unavailable register breaks python
                    unwinding
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: python
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

On arm-linux, until this commit:
...
commit bbb12eb9c84aa2b32480b7c022c494c2469ef717
Author: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
Date:   Mon Feb 26 19:11:45 2024 -0300

    gdb/arm: Remove tpidruro register from non-FreeBSD target descriptions
...
I ran into:
...
FAIL: gdb.base/inline-frame-cycle-unwind.exp: cycle at level 5: backtrace when
the unwind is broken at frame 5
...

Because this was the only reported progression, I decided to investigate a bit
further.

I found that the python unwinder fails because this piece of code in
pyuw_sniffer ignores the fact that value can be !entirely_available:
...
    /* Populate registers array.  */
    for (int i = 0; i < unwind_info->saved_regs->size (); ++i)
      {
        ...
        memcpy (cached->data.get (), value->contents ().data (), data_size);
      }
  }
...
which throws an unavailable error, which is then caught by
frame_unwind_try_unwinder:
...
      if (ex.error == NOT_AVAILABLE_ERROR)
        {
          /* This usually means that not even the PC is available,              
             thus most unwinders aren't able to determine if they're            
             the best fit.  Keep trying.  Fallback prologue unwinders           
             should always accept the frame.  */
          return 0;
        }
...

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-05-08 12:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-01 12:24 [Bug python/31437] New: [gdb/python] Unavailable register breaks python unwinding vries at gcc dot gnu.org
2024-03-01 12:27 ` [Bug python/31437] " vries at gcc dot gnu.org
2024-03-02  8:52 ` vries at gcc dot gnu.org
2024-03-02 12:37 ` vries at gcc dot gnu.org
2024-03-19  9:29 ` cvs-commit at gcc dot gnu.org
2024-05-08  8:36 ` vries at gcc dot gnu.org
2024-05-08 12:12 ` cvs-commit at gcc dot gnu.org
2024-05-08 12:14 ` vries at gcc dot gnu.org
2024-05-08 12:15 ` vries at gcc dot gnu.org

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).