diff options
author | John M Mellor-Crummey <johnmc@rice.edu> | 2021-10-20 18:19:38 -0500 |
---|---|---|
committer | Mark Wielaard <mark@klomp.org> | 2021-11-10 11:03:32 +0100 |
commit | dbd44e96f101a81f387ca6ff46910ab74ed7b1dc (patch) | |
tree | 062f1ea987223df99a9dae87aaa4a9e25c294b00 /libdw/ChangeLog | |
parent | 5b21e70216b853065fa2fef34273db5f7dcdc88b (diff) | |
download | elfutils-dbd44e96f101a81f387ca6ff46910ab74ed7b1dc.tar.gz |
libdw, readelf: Read inlining info in NVIDIA extended line map
As of CUDA 11.2, NVIDIA added extensions to the line map section
of CUDA binaries to represent inlined functions. These extensions
include
- two new fields in a line table row to represent inline
information: context, and functionname,
- two new DWARF extended opcodes: DW_LNE_NVIDIA_inlined_call,
DW_LNE_NVIDIA_set_function_name,
- an additional word in the line table header that indicates
the offset in the .debug_str function where the function
names for this line table begin, and
A line table row for an inlined function contains a non-zero "context"
value. The “context” field indicates the index of the line table row
that serves as the call site for an inlined context.
The "functionname" field in a line table row is only meaningful if the
"context" field of the row is non-zero. A meaningful "functionname"
field contains an index into the .debug_str section relative to the
base offset established in the line table header; the position in the
.debug_str section indicates the name of the inlined function.
These extensions resemble the proposed DWARF extensions
(http://dwarfstd.org/ShowIssue.php?issue=140906.1) by Cary Coutant,
but are not identical.
This commit integrates support for handling NVIDIA's extended line
maps into elfutil's libdw library, by adding two functions
dwarf_linecontext and dwarf_linefunctionname, and the readelf
--debug-dump=line command line utility.
Signed-off-by: John M Mellor-Crummey <johnmc@rice.edu>
Signed-off-by: Mark Wielaard <mark@klomp.org>
Diffstat (limited to 'libdw/ChangeLog')
-rw-r--r-- | libdw/ChangeLog | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/libdw/ChangeLog b/libdw/ChangeLog index 38e6efb2..ca742e6b 100644 --- a/libdw/ChangeLog +++ b/libdw/ChangeLog @@ -1,3 +1,22 @@ +2021-10-20 John M Mellor-Crummey <johnmc@rice.edu> + + * dwarf_linecontext.c: New file. + * dwarf_linefunctionname.c: Likewise. + * Makefile.am (libdw_a_SOURCES): Add dwarf_linecontext.c and + dwarf_linefunctionname.c + * dwarf.h: Add DW_LNE_NVIDIA_inlined_call and + DW_LNE_NVIDIA_set_function_name. + * dwarf_getsrclines.c (struct line_state): Add context and + function_name fields. + (add_new_line): Set context and function_name. + (MAX_STACK_LINES): Reduce to MAX_STACK_ALLOC / 2. + (read_srclines): Initialize context and function_name. Try to + read debug_str_offset if available. Handle + DW_LNE_NVIDIA_inlined_call and DW_LNE_NVIDIA_set_function_name. + * libdw.h (dwarf_linecontext): New declaration. + (dwarf_linefunctionname): Likewise. + * libdw.map (ELFUTILS_0.186): New section. + 2021-11-08 Mark Wielaard <mark@klomp.org> * dwarf_begin_elf.c (scn_dwarf_type): New function. |