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

            Bug ID: 98148
           Summary: [AArch64] Wrong location expression for function entry
                    values
           Product: gcc
           Version: 7.5.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: ---
              Host: aarch64-linux
            Target: aarch64-linux

Created attachment 49685
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49685&action=edit
ELF file

Right now I have only verified this on Ubuntu 18.04's GCC 7.5.0, while
executing GDB's testsuite for ada.

It seems the generation of debug information for entry values is off somehow.

I've attaching the ELF file.

Reproduction steps:

gdb foo -ex "break callee.increment" -ex "run" -ex "frame"

It should display the following:

#0  callee.increment (val=val@entry=99.0, msg=...)

But, instead, it shows the following:

#0  callee.increment (val=99.0, val@entry=9.18340949e-41, msg=...)

The fact that "val" and "val@entry" are displayed separately and that they have
different values shows that the information for "val@entry" is wrong.

In fact, if you move up a frame, we'll see that val is not the correct value...

#1  0x0000aaaaaaaab814 in caller.verbose_increment (val=9.18340949e-41,
msg=...)

It would be nice to test a master GCC, but I don't have a way to build it right
now.

Reply via email to