aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.dwarf2
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2012-03-08 19:37:08 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2012-03-08 19:37:08 +0000
commit7fe25d9bd274089557e2947f7ba09b6e333533cd (patch)
tree425e72499567e1844211391e2f13213d97f44866 /gdb/testsuite/gdb.dwarf2
parent05e7c244344f338bf2af7718db34eb91637587dd (diff)
downloadbinutils-7fe25d9bd274089557e2947f7ba09b6e333533cd.zip
binutils-7fe25d9bd274089557e2947f7ba09b6e333533cd.tar.gz
binutils-7fe25d9bd274089557e2947f7ba09b6e333533cd.tar.bz2
gdb/
Fix CU relative vs. absolute DIE offsets. * dwarf2loc.h (dwarf2_fetch_die_location_block): Rename parameter offset to offset_in_cu. * dwarf2read.c (process_enumeration_scope): Add CU offset to TYPE_OFFSET. (dwarf2_fetch_die_location_block): Rename parameter offset to offset_in_cu. New variable offset, add CU offset to OFFSET_IN_CU. gdb/testsuite/ Fix CU relative vs. absolute DIE offsets. * gdb.dwarf2/dw2-op-call.S: New compilation unit preceding the existing one.
Diffstat (limited to 'gdb/testsuite/gdb.dwarf2')
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-op-call.S17
1 files changed, 17 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-op-call.S b/gdb/testsuite/gdb.dwarf2/dw2-op-call.S
index c369966..39345b9 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-op-call.S
+++ b/gdb/testsuite/gdb.dwarf2/dw2-op-call.S
@@ -23,6 +23,23 @@ array2: .2byte 2
array3: .2byte 3
.section .debug_info
+.Lcu0_begin:
+ /* CU header */
+ .4byte .Lcu0_end - .Lcu0_start /* Length of Compilation Unit */
+.Lcu0_start:
+ .2byte 2 /* DWARF Version */
+ .4byte .Labbrev1_begin /* Offset into abbrev section */
+ .byte 4 /* Pointer size */
+
+ /* CU die */
+ .uleb128 1 /* Abbrev: DW_TAG_compile_unit */
+ .ascii "file0.txt\0" /* DW_AT_name */
+ .ascii "GNU C 3.3.3\0" /* DW_AT_producer */
+ .byte 2 /* DW_LANG_C (C) */
+
+ .byte 0 /* End of children of CU */
+.Lcu0_end:
+
.Lcu1_begin:
/* CU header */
.4byte .Lcu1_end - .Lcu1_start /* Length of Compilation Unit */