aboutsummaryrefslogtreecommitdiff
path: root/gdb/compile/compile-loc2c.c
diff options
context:
space:
mode:
authorZoran Zaric <zoran.zaric@amd.com>2022-10-25 14:33:36 +0100
committerZoran Zaric <zoran.zaric@amd.com>2022-10-26 10:43:27 +0100
commitb7383d64e7184470d19132831abb6f5b893d7b6e (patch)
tree5ca1643c9f2c7a01ad879aa0654d0b03655de8b7 /gdb/compile/compile-loc2c.c
parenta50f771b91791dcdd17aabd62ee83d76d6229c75 (diff)
downloadgdb-users/zaric/location_on_dwarf_stack.zip
gdb-users/zaric/location_on_dwarf_stack.tar.gz
gdb-users/zaric/location_on_dwarf_stack.tar.bz2
Add support for new DWARF overlay operationsusers/zaric/location_on_dwarf_stack
Another complex DWARF expression operations, that are usefull for SIMD/SIMT like architectures are: DW_OP_LLVM_overlay and DW_OP_LLVM_bit_overlay. These operations pop four stack entries, where the first must be an integral that represents an overlay size, the second must be an integral that represents a starting point of the overlay from the base location, the third must be a location description that represents the overlay location description and the forth must be a location description that represents the base location description. Resulting composite location description contains parts from base location description, overlayed by the overlay location description, starting from the overlay offset, ending at a sum of the overlay offset and overlay size. A new test in gdb.dwarf2 called dw2-llvm-overlay has been also added to test the support for both operations.
Diffstat (limited to 'gdb/compile/compile-loc2c.c')
-rw-r--r--gdb/compile/compile-loc2c.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/compile/compile-loc2c.c b/gdb/compile/compile-loc2c.c
index 8386327..c3de7e7 100644
--- a/gdb/compile/compile-loc2c.c
+++ b/gdb/compile/compile-loc2c.c
@@ -370,6 +370,11 @@ compute_stack_depth_worker (int start, int *need_tempvar,
stack_depth -= 2;
break;
+ case DW_OP_LLVM_overlay:
+ case DW_OP_LLVM_bit_overlay:
+ stack_depth -= 3;
+ break;
+
case DW_OP_LLVM_extend:
case DW_OP_LLVM_piece_end:
case DW_OP_LLVM_offset_constu: