This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug backtrace/16155] Backtraces in threads don't work on AArch64


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

Tom Tromey <tromey at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at redhat dot com

--- Comment #2 from Tom Tromey <tromey at redhat dot com> ---
gdb gets stuck in a loop in value_fetch_lazy.
At each step it tries to unwind a register.
But the unwinding takes this path in dwarf2-frame.c:

    case DWARF2_FRAME_REG_UNSPECIFIED:
      /* GCC, in its infinite wisdom decided to not provide unwind
     information for registers that are "same value".  Since
     DWARF2 (3 draft 7) doesn't define such behavior, said
     registers are actually undefined (which is different to CFI
     "undefined").  Code above issues a complaint about this.
     Here just fudge the books, assume GCC, and that the value is
     more inner on the stack.  */
      return frame_unwind_got_register (this_frame, regnum, regnum);

... and returns the same register in the same frame each time.
This makes for an infinite loop, sucking up memory on the value
chain besides.

Sticking a QUIT into this loop at least lets it be interruptible.

That's clearly a stopgap though.
I'm not certain yet what the correct fix may be.

Also I note that the AArch64 clone.S in glibc does not have CFI
information.  That is a contributing cause of this bug.

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]