summaryrefslogtreecommitdiffstats
path: root/tests/varlocs.c
diff options
context:
space:
mode:
authorMark Wielaard <[email protected]>2023-02-10 13:56:58 +0100
committerMark Wielaard <[email protected]>2023-02-14 17:28:40 +0100
commiteab09c65a9eacb3f6001488f6980e5ac8f0c0aeb (patch)
tree7f26da34299c8b63545965f470a382739417999c /tests/varlocs.c
parent922068cebba6ed0dfc2da0a9e40e3e1b63e0aca9 (diff)
libdw: Handle DW_OP_GNU_uninit in dwarf_getlocation
dwarf_getlocation would return an error when it saw a DW_OP_GNU_uninit. Handle it by simply recognizing as a no argument operation. DW_OP_GNU_uninit is emitted by GCC as a marker to flag the location expression as referring to an uninitialized value. Signed-off-by: Mark Wielaard <[email protected]>
Diffstat (limited to 'tests/varlocs.c')
-rw-r--r--tests/varlocs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/varlocs.c b/tests/varlocs.c
index d2c13767..8e563fd3 100644
--- a/tests/varlocs.c
+++ b/tests/varlocs.c
@@ -251,6 +251,12 @@ print_expr (Dwarf_Attribute *attr, Dwarf_Op *expr, Dwarf_Addr addr, int depth)
printf ("%s", opname);
break;
+ case DW_OP_GNU_uninit:
+ /* No arguments. Special. It means the expression describes
+ an value which hasn't been initialized (yet). */
+ printf ("%s", opname);
+ break;
+
case DW_OP_call_frame_cfa:
/* No arguments. Special. Pushes Call Frame Address as computed
by CFI data (dwarf_cfi_addrframe will fetch that info (either from