drgn/libdrgn
Omar Sandoval faad25d7b2 libdrgn: debug_info: fix address of objects with size zero
The stack trace variable work introduced a regression that causes
objects with size zero to always be marked absent even if they have an
address. This matters because GCC sometimes seems to omit the complete
array type for arrays declared without a length, so an array variable
can end up with an incomplete array type. I saw this with the
"swapper_spaces" variable in mm/swap_state.c from the Linux kernel.

Make sure to use the address of an empty piece if the variable is also
empty.

Fixes: ffcb9ccb19 ("libdrgn: debug_info: implement creating objects from DWARF location descriptions")
Signed-off-by: Omar Sandoval <osandov@osandov.com>
2021-06-07 15:46:22 -07:00
..
build-aux Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
examples libdrgn: add option to time load_debug_info example program 2021-04-23 09:29:44 -07:00
include libdrgn: add latest elf.h and dwarf.h to support elfutils 0.165 2021-03-21 23:18:39 -07:00
m4 Remove bundled version of elfutils 2021-03-16 00:52:09 -07:00
python cli: show elfutils version in use 2021-06-07 11:10:50 -07:00
.gitignore libdrgn: add configure~ to .gitignore 2021-04-23 09:18:16 -07:00
arch_ppc64.c Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
arch_ppc64.defs Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
arch_register_layout.h Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
arch_x86_64.c Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
arch_x86_64.defs Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
binary_buffer.c Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
binary_buffer.h Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
binary_search_tree.h Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
bitops.h Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
cfi.c Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
cfi.h Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
cityhash.h Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
configure.ac drgn 0.0.12 2021-06-07 01:13:28 -07:00
debug_info.c libdrgn: debug_info: fix address of objects with size zero 2021-06-07 15:46:22 -07:00
debug_info.h libdrgn: support looking up parameters and variables in stack traces 2021-06-05 16:18:51 -07:00
Doxyfile libdrgn: clean up stale comment references and Doxygen warnings 2021-03-16 16:15:43 -07:00
drgn.h.in libdrgn: support looking up parameters and variables in stack traces 2021-06-05 16:18:51 -07:00
dwarf_index.c libdrgn: don't use OpenMP tasking 2021-05-06 16:56:02 -07:00
dwarf_index.h libdrgn: don't use OpenMP tasking 2021-05-06 16:56:02 -07:00
error.c Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
error.h Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
hash_table.c Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
hash_table.h Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
helpers.h Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
kdump.c Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
language_c.c libdrgn: make addresses wrap around when reading memory 2021-06-03 17:49:29 -07:00
language.c Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
language.h Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
lazy_object.c Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
lazy_object.h Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
lexer.c Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
lexer.h Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
linux_kernel_helpers.c Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
linux_kernel.c libdrgn: make addresses wrap around when reading memory 2021-06-03 17:49:29 -07:00
linux_kernel.h libdrgn: make addresses wrap around when reading memory 2021-06-03 17:49:29 -07:00
Makefile.am libdrgn: Makefile: remove generated source files from CLEANFILES 2021-04-03 01:31:14 -07:00
memory_reader.c libdrgn: make addresses wrap around when reading memory 2021-06-03 17:49:29 -07:00
memory_reader.h libdrgn: make addresses wrap around when reading memory 2021-06-03 17:49:29 -07:00
minmax.h Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
object_index.c Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
object_index.h Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
object.c libdrgn: debug_info: implement creating objects from DWARF location descriptions 2021-06-05 16:18:51 -07:00
object.h libdrgn: debug_info: implement creating objects from DWARF location descriptions 2021-06-05 16:18:51 -07:00
orc.h Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
path.c Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
path.h Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
platform.c Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
platform.h Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
pp.h Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
program.c libdrgn: make addresses wrap around when reading memory 2021-06-03 17:49:29 -07:00
program.h Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
register_state.c Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
register_state.h Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
serialize.c libdrgn: debug_info: implement creating objects from DWARF location descriptions 2021-06-05 16:18:51 -07:00
serialize.h libdrgn: debug_info: implement creating objects from DWARF location descriptions 2021-06-05 16:18:51 -07:00
siphash.h Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
splay_tree.c Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
stack_trace.c libdrgn: support looking up parameters and variables in stack traces 2021-06-05 16:18:51 -07:00
stack_trace.h libdrgn: stack_trace: pretty print frames and add frames for inline functions 2021-06-05 16:18:51 -07:00
string_builder.c Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
string_builder.h Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
symbol.c Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
symbol.h Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
type.c Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
type.h Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
util.h libdrgn: stack_trace: pretty print frames and add frames for inline functions 2021-06-05 16:18:51 -07:00
vector.c Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00
vector.h Use GPL-3.0-or-later license identifier instead of GPL-3.0+ 2021-04-03 01:10:35 -07:00