aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
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
parent05e7c244344f338bf2af7718db34eb91637587dd (diff)
downloadgdb-7fe25d9bd274089557e2947f7ba09b6e333533cd.zip
gdb-7fe25d9bd274089557e2947f7ba09b6e333533cd.tar.gz
gdb-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')
-rw-r--r--gdb/testsuite/ChangeLog6
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-op-call.S17
2 files changed, 23 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index a5b57f5..22b3849 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,11 @@
2012-03-08 Jan Kratochvil <jan.kratochvil@redhat.com>
+ Fix CU relative vs. absolute DIE offsets.
+ * gdb.dwarf2/dw2-op-call.S: New compilation unit preceding the existing
+ one.
+
+2012-03-08 Jan Kratochvil <jan.kratochvil@redhat.com>
+
Fix false FAIL on distros with relro linkage as default.
* gdb.reverse/solib-precsave.exp: Try to compile the test using
-Wl,-z,norelro first.
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 */