http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60387

--- Comment #12 from Nistor, Mihail-Marian <m_nistor at yahoo dot com> ---
The ppc gcc uses the DWARF register number mapping that is defined by the
psABI, but the main problem is: the psABI is for AI32/64 architectures. The
DWARF register number mapping is also used to encode all debug data information
so the affected DWARF sections are:  .debug_info and .debug_frame. The ppc gcc
must document division from the PPC ABI standard (see an example at comment 2).
It should also specify that the internal/unofficial DWARF register number
mapping will be used for .eh_frame and DWARF standard.
The AI32/64 ABI consists of the following: psABI, ABI-EH and SWCONV (see more
information at http://mentorembedded.github.io/cxx-abi/abi.html on 1.5 Base
Document). An important notice here is the primary API for this architecture
(psABI) refers ABI-EH and SWCONV documents. In the SWCONV document the AI32/64
describes how the debugger should access the data that are particular for this
architecture (see more information in 11. Stack Unwinding and Exception
Handling chapter).

I didn’t see any documents on how the support is done for PPC architecture.
This document must be provided and the PPC ABI must refer to it.

I don’t think that the most important rules from the “11.3 Coding Conventions
for Reliable Unwinding” chapter from SWCONV were followed by the ppc gcc
implementation. The “prolog” and “epilog”   ranges do not obey these rules
defined in 11 chapter.

Until the above problems is solved we have a reference from DWARF3/4 that
should be resolved by using undocumented ABI (the test case is: the debugger
should compute the location for a local variable that is related to the frame
base (DW_AT_location is defined as DW_OP_fbreg) and the value for
DW_AT_frame_base is defined as DW_OP_call_frame_cfa for current function).  

I have been looking to see a full specification and implementation for this
custom solution.

Reply via email to