public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/94502] New: [aarch64] Missing LR register location in FDE
@ 2020-04-06 14:55 luis.machado at linaro dot org
  2020-04-08 13:22 ` [Bug debug/94502] " luis.machado at linaro dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: luis.machado at linaro dot org @ 2020-04-06 14:55 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94502

            Bug ID: 94502
           Summary: [aarch64] Missing LR register location in FDE
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: luis.machado at linaro dot org
  Target Milestone: ---

I've noticed this while investigating a GDB testsuite failure in
gdb.opt/inline-break.exp. Basically GDB runs into an internal error due to not
being able to unwind the PC register (which, in turn, requires the LR
register).

I originally noticed this with Ubuntu's GCC (gcc version 7.4.0 (Ubuntu
7.4.0-1ubuntu1~18.04.1). But i managed to reproduce the same problem with gcc
master at revision c72a1b6f8b26de37d1a922a8af143af009747498.

Reproduction steps:

1 - Build the test like so: gcc -g3
<gdb_tree_path>/gdb/testsuite/gdb.opt/inline-break/inline-break.c -o
inline-break

2 - readelf -w inline-break > inline-break.dwarf

3 - Take note of the low address of function not_inline_func1

4 - Locate the FDE entry for the PC above.

5 - You'll notice there is no rule to locate LR, which is required by GDB to
determine PC.

This is the FDE entry i see:

00000108 0000000000000014 0000010c FDE cie=00000000
pc=0000000000400674..00000000004006b0
DW_CFA_advance_loc: 4 to 0000000000400678
DW_CFA_def_cfa_offset: 32
DW_CFA_advance_loc: 52 to 00000000004006ac
DW_CFA_def_cfa_offset: 0
DW_CFA_nop

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

end of thread, other threads:[~2020-04-09 10:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-06 14:55 [Bug debug/94502] New: [aarch64] Missing LR register location in FDE luis.machado at linaro dot org
2020-04-08 13:22 ` [Bug debug/94502] " luis.machado at linaro dot org
2020-04-08 13:57 ` wilco at gcc dot gnu.org
2020-04-08 14:15 ` luis.machado at linaro dot org
2020-04-08 14:20 ` wilco at gcc dot gnu.org
2020-04-08 14:40 ` luis.machado at linaro dot org
2020-04-08 14:40 ` luis.machado at linaro dot org
2020-04-09 10:34 ` rearnsha 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).