llvm-project/llvm/test/DebugInfo/NVPTX
Alexey Bataev f3a9150324 [DEBUG_INFO][NVPTX] Generate DW_AT_address_class to get the values in debugger.
Summary:
According to
https://docs.nvidia.com/cuda/archive/10.0/ptx-writers-guide-to-interoperability/index.html#cuda-specific-dwarf,
the compiler should emit the DW_AT_address_class attribute for all
variable and parameter. It means, that DW_AT_address_class attribute
should be used in the non-standard way to support compatibility with the
cuda-gdb debugger.
Clang is able to generate the information about the variable address
class. This information is emitted as the expression sequence
`DW_OP_constu <DWARF Address Space> DW_OP_swap DW_OP_xderef`. The patch
tries to find all such expressions and transform them into
`DW_AT_address_class <DWARF Address Space>` if target is NVPTX and the debugger is gdb.
If the expression is not found, then default values are used. For the
local variables <DWARF Address Space> is set to ADDR_local_space(6), for
the globals <DWARF Address Space> is set to ADDR_global_space(5). The
values are taken from the table in the same section 5.2. CUDA-Specific
DWARF Definitions.

Reviewers: echristo, probinson

Subscribers: jholewinski, aprantl, llvm-commits

Differential Revision: https://reviews.llvm.org/D57157

llvm-svn: 353203
2019-02-05 19:33:47 +00:00
..
cu-range-hole.ll [DEBUGINFO, NVPTX] Enable support for the debug info on NVPTX target. 2019-01-23 18:59:54 +00:00
dbg-declare-alloca.ll [DEBUG_INFO][NVPTX] Generate DW_AT_address_class to get the values in debugger. 2019-02-05 19:33:47 +00:00
dbg-value-const-byref.ll [DebugInfo][DAG] Process FrameIndex dbg.values unconditionally 2019-01-29 09:40:05 +00:00
debug-addr-class.ll [DEBUG_INFO][NVPTX] Generate DW_AT_address_class to get the values in debugger. 2019-02-05 19:33:47 +00:00
debug-empty.ll [DEBUGINFO, NVPTX] Enable support for the debug info on NVPTX target. 2019-01-23 18:59:54 +00:00
debug-file-loc-only.ll [DEBUGINFO, NVPTX] Disable emission of ',debug' option if only debug directives are allowed. 2018-12-06 16:25:35 +00:00
debug-file-loc.ll [DEBUGINFO, NVPTX] Enable support for the debug info on NVPTX target. 2019-01-23 18:59:54 +00:00
debug-info.ll [DebugInfo][DAG] Avoid re-ordering of DBG_VALUEs 2019-01-28 12:08:31 +00:00
debug-loc-offset.ll [DEBUGINFO, NVPTX] Enable support for the debug info on NVPTX target. 2019-01-23 18:59:54 +00:00
lit.local.cfg