summaryrefslogtreecommitdiff
path: root/gdb/dwarf2expr.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2010-05-21 21:13:10 +0000
committerTom Tromey <tromey@redhat.com>2010-05-21 21:13:10 +0000
commitee779f4f30dec4b5d37eea238efcad582f7ec617 (patch)
tree973720316c88e824b34abe3e877c7ecde96a22cd /gdb/dwarf2expr.h
parente5bc3cd416a16fa5ee24f4a7c7f91a58f22fa4ba (diff)
downloadgdb-ee779f4f30dec4b5d37eea238efcad582f7ec617.tar.gz
gdb
* dwarf2loc.c (extract_bits_primitive): New function. (extract_bits): Likewise. (insert_bits): Likewise. (copy_bitwise): Likewise. (read_pieced_value): Do all operations in bits. (write_pieced_value): Likewise. * dwarf2expr.h (struct dwarf_expr_piece) <offset>: New field. * dwarf2expr.c (add_piece): New arguments bit_piece, offset. Always use xrealloc to resize piece array. (execute_stack_op) <DW_OP_reg0>: Handle DW_OP_bit_piece. <DW_OP_piece>: Update. <DW_OP_bit_piece>: New case. gdb/testsuite * gdb.dwarf2/pieces.exp (pieces_test_f3): New proc. Call it. * gdb.dwarf2/pieces.S: Update. * gdb.dwarf2/pieces.c (struct B): Remove initial field.
Diffstat (limited to 'gdb/dwarf2expr.h')
-rw-r--r--gdb/dwarf2expr.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/dwarf2expr.h b/gdb/dwarf2expr.h
index f24f1930ae5..487d4f7bfdf 100644
--- a/gdb/dwarf2expr.h
+++ b/gdb/dwarf2expr.h
@@ -155,7 +155,7 @@ struct dwarf_expr_context
};
-/* A piece of an object, as recorded by DW_OP_piece. */
+/* A piece of an object, as recorded by DW_OP_piece or DW_OP_bit_piece. */
struct dwarf_expr_piece
{
enum dwarf_value_location location;
@@ -181,8 +181,10 @@ struct dwarf_expr_piece
} literal;
} v;
- /* The length of the piece, in bytes. */
+ /* The length of the piece, in bits. */
ULONGEST size;
+ /* The piece offset, in bits. */
+ ULONGEST offset;
};
struct dwarf_expr_context *new_dwarf_expr_context (void);