]> git.ipfire.org Git - thirdparty/gcc.git/commit
amdgcn: Support basic DWARF
authorAndrew Stubbs <ams@codesourcery.com>
Fri, 26 Jun 2020 16:10:55 +0000 (17:10 +0100)
committerGiuliano Belinassi <giuliano.belinassi@usp.br>
Mon, 17 Aug 2020 16:15:21 +0000 (13:15 -0300)
commit14f71bdbaa6091ffba6a75730c38c4454630ffa2
tree9021e2022014ae45cfc12e3dc06a7703b9f3d5fc
parent0dfa34bc3fb513cd53465bf6f64a2ebe80e4f8ad
amdgcn: Support basic DWARF

This is enough DWARF support for "-O0 -g" to work OK, within a single frame,
using the new rocgdb debugger from AMD.  Debugging with optimization enabled
also works when the values are located in SGPRs or memory.

Scalars in VGPRs are problematic, EXEC_HI and VCC_HI are unmappable, and
CFI remains unimplemented.

gcc/ChangeLog:

* config/gcn/gcn-hsa.h (DBX_REGISTER_NUMBER): New macro.
* config/gcn/gcn-protos.h (gcn_dwarf_register_number): New prototype.
* config/gcn/gcn.c (gcn_expand_prologue): Add RTX_FRAME_RELATED_P
and REG_FRAME_RELATED_EXPR to stack and frame pointer adjustments.
(gcn_dwarf_register_number): New function.
(gcn_dwarf_register_span): New function.
(TARGET_DWARF_REGISTER_SPAN): New hook macro.
gcc/config/gcn/gcn-hsa.h
gcc/config/gcn/gcn-protos.h
gcc/config/gcn/gcn.c