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

            Bug ID: 111680
           Summary: DWARF information inconstant with the generated RISC-V
                    Binary
           Product: gcc
           Version: 12.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: king.chung at manchester dot ac.uk
  Target Milestone: ---

Created attachment 56041
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56041&action=edit
Screen capture of the Binary and DWARF data.

The DWARF information presented is not matching with the RISC-V binary. On the
attached picture, the left-hand side is the generated binary, and on the
right-hand side is the DWARF information. On the left, we can see the order of
operation is SP Change -> Value Store -> SP Change. However, on the right is SP
Change -> SP Change -> Value Store. If I did not understand the DWARF standard
wrong, the calculation is based on the most recent CFA value, which, in this
case, just by using the DWARF data, the saved value cannot be recovered.

Some discussions have been started on the RISC-V gnu toolchain Repo:
https://github.com/riscv-collab/riscv-gnu-toolchain/issues/1336

Reply via email to