* [commit] Fix rereading of DWO DIEs
@ 2012-07-01 2:18 Doug Evans
2012-07-02 8:34 ` [patch 1/2] testcase: Make it -m32 compatible [Re: [commit] Fix rereading of DWO DIEs] Jan Kratochvil
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Doug Evans @ 2012-07-01 2:18 UTC (permalink / raw)
To: gdb-patches
Hi.
This patch fixes the load_all_dies case for Fission.
[This part of GDB is a little, umm, muddy: GDB can be reading a
DW_TAG_{compile,type}_unit, skipping various details, and in the middle
of reading it GDB can decide it needs those details so reads it in again.]
2012-06-30 Doug Evans <dje@google.com>
* dwarf2read.c (signatured_type): Make "per_cu" member first.
(init_cutu_and_read_dies): Handle rereading a DWO CU while it's
currently being read. Propagate DW_AT_comp_dir to DWO DIE.
testsuite/
* gdb.dwarf2/fission-reread.S: New file.
* gdb.dwarf2/fission-reread.exp: New file.
Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.676
diff -u -p -r1.676 dwarf2read.c
--- dwarf2read.c 29 Jun 2012 00:52:41 -0000 1.676
+++ dwarf2read.c 1 Jul 2012 01:52:47 -0000
@@ -544,6 +544,11 @@ struct dwarf2_per_cu_data
struct signatured_type
{
+ /* The "per_cu" object of this type.
+ N.B.: This is the first member so that it's easy to convert pointers
+ between them. */
+ struct dwarf2_per_cu_data per_cu;
+
/* The type's signature. */
ULONGEST signature;
@@ -557,9 +562,6 @@ struct signatured_type
The value is zero until the actual value is known.
Zero is otherwise not a valid section offset. */
sect_offset type_offset_in_section;
-
- /* The CU(/TU) of this type. */
- struct dwarf2_per_cu_data per_cu;
};
/* These sections are what may appear in a "dwo" file. */
@@ -3851,6 +3853,8 @@ lookup_signatured_type (ULONGEST sig)
entry = htab_find (dwarf2_per_objfile->signatured_types, &find_entry);
return entry;
}
+\f
+/* Low level DIE reading support. */
/* Initialize a die_reader_specs struct from a dwarf2_cu struct. */
@@ -3899,6 +3903,10 @@ init_cutu_and_read_dies (struct dwarf2_p
struct cleanup *cleanups, *free_cu_cleanup = NULL;
struct signatured_type *sig_type = NULL;
struct dwarf2_section_info *abbrev_section;
+ /* Non-zero if CU currently points to a DWO file and we need to
+ reread it. When this happens we need to reread the skeleton die
+ before we can reread the DWO file. */
+ int rereading_dwo_cu = 0;
if (use_existing_cu)
gdb_assert (keep);
@@ -3914,7 +3922,15 @@ init_cutu_and_read_dies (struct dwarf2_p
if (use_existing_cu && this_cu->cu != NULL)
{
cu = this_cu->cu;
- info_ptr += cu->header.first_die_offset.cu_off;
+
+ /* If this CU is from a DWO file we need to start over, we need to
+ refetch the attributes from the skeleton CU.
+ This could be optimized by retrieving those attributes from when we
+ were here the first time: the previous comp_unit_die was stored in
+ comp_unit_obstack. But there's no data yet that we need this
+ optimization. */
+ if (cu->dwo_unit != NULL)
+ rereading_dwo_cu = 1;
}
else
{
@@ -3926,26 +3942,35 @@ init_cutu_and_read_dies (struct dwarf2_p
/* If an error occurs while loading, release our storage. */
free_cu_cleanup = make_cleanup (free_heap_comp_unit, cu);
+ }
+ if (cu->header.first_die_offset.cu_off != 0 && ! rereading_dwo_cu)
+ {
+ /* We already have the header, there's no need to read it in again. */
+ info_ptr += cu->header.first_die_offset.cu_off;
+ }
+ else
+ {
if (this_cu->is_debug_types)
{
ULONGEST signature;
+ cu_offset type_offset_in_tu;
info_ptr = read_and_check_type_unit_head (&cu->header, section,
abbrev_section, info_ptr,
- &signature, NULL);
+ &signature,
+ &type_offset_in_tu);
- /* There's no way to get from PER_CU to its containing
- struct signatured_type.
- But we have the signature so we can use that. */
- sig_type = lookup_signatured_type (signature);
- /* We've already scanned all the signatured types,
- this must succeed. */
- gdb_assert (sig_type != NULL);
- gdb_assert (&sig_type->per_cu == this_cu);
+ /* Since per_cu is the first member of struct signatured_type,
+ we can go from a pointer to one to a pointer to the other. */
+ sig_type = (struct signatured_type *) this_cu;
+ gdb_assert (sig_type->signature == signature);
+ gdb_assert (sig_type->type_offset_in_tu.cu_off
+ == type_offset_in_tu.cu_off);
gdb_assert (this_cu->offset.sect_off == cu->header.offset.sect_off);
- /* LENGTH has not been set yet for type units. */
+ /* LENGTH has not been set yet for type units if we're
+ using .gdb_index. */
this_cu->length = get_cu_length (&cu->header);
/* Establish the type offset that can be used to lookup the type. */
@@ -3973,12 +3998,19 @@ init_cutu_and_read_dies (struct dwarf2_p
/* If we don't have them yet, read the abbrevs for this compilation unit.
And if we need to read them now, make sure they're freed when we're
- done. */
+ done. Note that it's important that if the CU had an abbrev table
+ on entry we don't free it when we're done: Somewhere up the call stack
+ it may be in use. */
if (cu->abbrev_table == NULL)
{
dwarf2_read_abbrevs (cu, abbrev_section);
make_cleanup (dwarf2_free_abbrev_table, cu);
}
+ else if (rereading_dwo_cu)
+ {
+ dwarf2_free_abbrev_table (cu);
+ dwarf2_read_abbrevs (cu, abbrev_section);
+ }
/* Read the top level CU/TU die. */
init_cu_die_reader (&reader, cu, section, NULL);
@@ -3991,10 +4023,10 @@ init_cutu_and_read_dies (struct dwarf2_p
if (attr)
{
char *dwo_name = DW_STRING (attr);
- const char *comp_dir;
+ const char *comp_dir_string;
struct dwo_unit *dwo_unit;
ULONGEST signature; /* Or dwo_id. */
- struct attribute *stmt_list, *low_pc, *high_pc, *ranges;
+ struct attribute *comp_dir, *stmt_list, *low_pc, *high_pc, *ranges;
int i,num_extra_attrs;
struct dwarf2_section_info *dwo_abbrev_section;
@@ -4008,15 +4040,16 @@ init_cutu_and_read_dies (struct dwarf2_p
However, the attribute is found in the stub which we won't have later.
In order to not impose this complication on the rest of the code,
we read them here and copy them to the DWO CU/TU die. */
- stmt_list = low_pc = high_pc = ranges = NULL;
/* For TUs in DWO files, the DW_AT_stmt_list attribute lives in the
DWO file. */
+ stmt_list = NULL;
if (! this_cu->is_debug_types)
stmt_list = dwarf2_attr (comp_unit_die, DW_AT_stmt_list, cu);
low_pc = dwarf2_attr (comp_unit_die, DW_AT_low_pc, cu);
high_pc = dwarf2_attr (comp_unit_die, DW_AT_high_pc, cu);
ranges = dwarf2_attr (comp_unit_die, DW_AT_ranges, cu);
+ comp_dir = dwarf2_attr (comp_unit_die, DW_AT_comp_dir, cu);
/* There should be a DW_AT_addr_base attribute here (if needed).
We need the value before we can process DW_FORM_GNU_addr_index. */
@@ -4047,15 +4080,14 @@ init_cutu_and_read_dies (struct dwarf2_p
}
/* We may need the comp_dir in order to find the DWO file. */
- comp_dir = NULL;
- attr = dwarf2_attr (comp_unit_die, DW_AT_comp_dir, cu);
- if (attr)
- comp_dir = DW_STRING (attr);
+ comp_dir_string = NULL;
+ if (comp_dir)
+ comp_dir_string = DW_STRING (comp_dir);
if (this_cu->is_debug_types)
- dwo_unit = lookup_dwo_type_unit (sig_type, dwo_name, comp_dir);
+ dwo_unit = lookup_dwo_type_unit (sig_type, dwo_name, comp_dir_string);
else
- dwo_unit = lookup_dwo_comp_unit (this_cu, dwo_name, comp_dir,
+ dwo_unit = lookup_dwo_comp_unit (this_cu, dwo_name, comp_dir_string,
signature);
if (dwo_unit == NULL)
@@ -4110,7 +4142,8 @@ init_cutu_and_read_dies (struct dwarf2_p
num_extra_attrs = ((stmt_list != NULL)
+ (low_pc != NULL)
+ (high_pc != NULL)
- + (ranges != NULL));
+ + (ranges != NULL)
+ + (comp_dir != NULL));
info_ptr = read_full_die_1 (&reader, &comp_unit_die, info_ptr,
&has_children, num_extra_attrs);
@@ -4124,6 +4157,8 @@ init_cutu_and_read_dies (struct dwarf2_p
comp_unit_die->attrs[i++] = *high_pc;
if (ranges != NULL)
comp_unit_die->attrs[i++] = *ranges;
+ if (comp_dir != NULL)
+ comp_unit_die->attrs[i++] = *comp_dir;
comp_unit_die->num_attrs += num_extra_attrs;
/* Skip dummy compilation units. */
Index: testsuite/gdb.dwarf2/fission-reread.S
===================================================================
RCS file: testsuite/gdb.dwarf2/fission-reread.S
diff -N testsuite/gdb.dwarf2/fission-reread.S
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ testsuite/gdb.dwarf2/fission-reread.S 1 Jul 2012 01:52:47 -0000
@@ -0,0 +1,459 @@
+/* Copyright 2012 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Testcase to exercise the code path in bug 13961 for Fission.
+ http://gcc.gnu.org/wiki/DebugFission
+
+ Compiled from:
+
+ class foo
+ {
+ public:
+ int bar;
+ };
+
+ foo baz;
+
+ int
+ main ()
+ {
+ return 0;
+ }
+
+ And then manually edited to insert the necessary DW_AT_specification
+ entries to trigger the desired code path.
+ There's no real need to make this architecture-specific, so it has been
+ further hand-edited to support that.
+*/
+
+ .file "fission-reread.cc"
+
+ .globl baz
+ .bss
+ .align 4
+ .type baz, @object
+ .size baz, 4
+baz:
+ .zero 4
+
+ .text
+.Ltext0:
+ .globl main
+ .type main, @function
+main:
+.LFB0:
+ .file 1 "fission-reread.cc"
+ .loc 1 11 0
+ .4byte 0
+.LFE0:
+ .size main, .-main
+.Letext0:
+
+ .section .debug_types.dwo,"G",@progbits,wt.198b7eaccef12290,comdat
+.Ltu_start_dwo:
+ .4byte .Ltu_end_dwo - .Ltu_start_dwo - 4 # Length of Compilation Unit Info
+ .2byte 0x4 # DWARF version number
+ .4byte .Ldebug_abbrev0 # Offset Into Abbrev. Section
+ .byte 0x8 # Pointer Size (in bytes)
+ .byte 0x19 # Type Signature
+ .byte 0x8b
+ .byte 0x7e
+ .byte 0xac
+ .byte 0xce
+ .byte 0xf1
+ .byte 0x22
+ .byte 0x90
+ .4byte .Ltu_class_type - .Ltu_start_dwo # Offset to Type DIE
+ .uleb128 0x1 # (DIE (0x17) DW_TAG_type_unit)
+ .byte 0x4 # DW_AT_language
+ .byte 0x73 # DW_AT_GNU_odr_signature
+ .byte 0xea
+ .byte 0x85
+ .byte 0x23
+ .byte 0x75
+ .byte 0x8a
+ .byte 0x7e
+ .byte 0x87
+ .4byte .Lskeleton_debug_line0 # DW_AT_stmt_list
+
+ /* Manually inserted to have a DW_AT_specification refering to
+ something and appearing ahead of it. */
+ .uleb128 0x8 /* DW_TAG_class_type */
+ .4byte .Ltu_class_type - .Ltu_start_dwo
+ /* End of manual insertion */
+
+.Ltu_class_type:
+ .uleb128 0x2 # (DIE (0x25) DW_TAG_class_type)
+ .ascii "foo\0" # DW_AT_name
+ .byte 0x4 # DW_AT_byte_size
+ .byte 0x1 # DW_AT_decl_file (fission-reread.cc)
+ .byte 0x1 # DW_AT_decl_line
+ .4byte .Ltu_int # DW_AT_sibling
+ .uleb128 0x3 # (DIE (0x31) DW_TAG_member)
+ .ascii "bar\0" # DW_AT_name
+ .byte 0x1 # DW_AT_decl_file (fission-reread.cc)
+ .byte 0x4 # DW_AT_decl_line
+ .4byte .Ltu_int # DW_AT_type
+ .byte 0 # DW_AT_data_member_location
+ .byte 0x1 # DW_AT_accessibility
+ .byte 0 # end of children of DIE 0x25
+.Ltu_int:
+ .uleb128 0x4 # (DIE (0x3f) DW_TAG_base_type)
+ .byte 0x4 # DW_AT_byte_size
+ .byte 0x5 # DW_AT_encoding
+ .ascii "int\0" # DW_AT_name
+ .byte 0 # end of children of DIE 0x17
+.Ltu_end_dwo:
+
+ .section .debug_types,"G",@progbits,wt.198b7eaccef12290,comdat
+.Ltu_start:
+ .4byte .Ltu_end - .Ltu_start - 4 # Length of Type Unit Info
+ .2byte 0x4 # DWARF version number
+ .4byte .Lskeleton_debug_abbrev0 # Offset Into Abbrev. Section
+ .byte 0x8 # Pointer Size (in bytes)
+ .byte 0x19 # Type Signature
+ .byte 0x8b
+ .byte 0x7e
+ .byte 0xac
+ .byte 0xce
+ .byte 0xf1
+ .byte 0x22
+ .byte 0x90
+ .4byte 0 # Offset to Type DIE
+ .uleb128 0x2 # (DIE (0) DW_TAG_type_unit)
+ .ascii "/tmp/src/gdb/testsuite/gdb.dwarf2\0" # DW_AT_comp_dir
+ # Normally dwo_name would be "fission-reread.dwo".
+ # Simplification: Leave the DWO contents in the executable.
+ .ascii "fission-reread\0" # DW_AT_GNU_dwo_name
+ .4byte .Ldebug_pubnames0 # DW_AT_GNU_pubnames
+ .4byte .Ldebug_pubtypes0 # DW_AT_GNU_pubtypes
+ .4byte .Ldebug_addr0 # DW_AT_GNU_addr_base
+.Ltu_end:
+
+ .section .debug_info.dwo,"",@progbits
+.Lcu_start_dwo:
+ .4byte .Lcu_end_dwo - .Lcu_start_dwo - 4 # Length of Compilation Unit Info
+ .2byte 0x4 # DWARF version number
+ .4byte .Ldebug_abbrev0 # Offset Into Abbrev. Section
+ .byte 0x8 # Pointer Size (in bytes)
+ .uleb128 0x5 # (DIE (0xb) DW_TAG_compile_unit)
+ .ascii "GNU C++ 4.6.x-fission\0" # DW_AT_producer
+ .byte 0x4 # DW_AT_language
+ .ascii "fission-reread.cc\0" # DW_AT_name
+ .ascii "/tmp/src/gdb/testsuite/gdb.dwarf2\0" # DW_AT_comp_dir
+ .byte 0 # DW_AT_GNU_dwo_id
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 0
+.Lcu_int:
+ .uleb128 0x4 # (DIE (0x7f) DW_TAG_base_type)
+ .byte 0x4 # DW_AT_byte_size
+ .byte 0x5 # DW_AT_encoding
+ .ascii "int\0" # DW_AT_name
+ .uleb128 0x6 # (DIE (0x86) DW_TAG_subprogram)
+ # DW_AT_external
+ .ascii "main\0" # DW_AT_name
+ .byte 0x1 # DW_AT_decl_file (fission-reread.cc)
+ .byte 0xa # DW_AT_decl_line
+ .4byte .Lcu_int # DW_AT_type
+ .uleb128 0 # DW_AT_low_pc
+ .8byte .LFE0-.LFB0 # DW_AT_high_pc
+ .uleb128 0x1 # DW_AT_frame_base
+ .byte 0x9c # DW_OP_call_frame_cfa
+ .uleb128 0x7 # (DIE (0x9d) DW_TAG_variable)
+ .ascii "baz\0" # DW_AT_name
+ .byte 0x1 # DW_AT_decl_file (fission-reread.cc)
+ .byte 0x7 # DW_AT_decl_line
+ .byte 0x19 # DW_AT_type
+ .byte 0x8b
+ .byte 0x7e
+ .byte 0xac
+ .byte 0xce
+ .byte 0xf1
+ .byte 0x22
+ .byte 0x90
+ # DW_AT_external
+ .uleb128 0x2 # DW_AT_location
+ .byte 0xfb # DW_OP_GNU_addr_index
+ .uleb128 0x1 # (index into .debug_addr)
+ .byte 0 # end of children of DIE 0xb
+.Lcu_end_dwo:
+
+ .section .debug_info,"",@progbits
+.Lskeleton_debug_info0:
+.Lcu_start:
+ .4byte .Lcu_end - .Lcu_start - 4 # Length of Compilation Unit Info
+ .2byte 0x4 # DWARF version number
+ .4byte .Lskeleton_debug_abbrev0 # Offset Into Abbrev. Section
+ .byte 0x8 # Pointer Size (in bytes)
+ .uleb128 0x1 # (DIE (0) DW_TAG_compile_unit)
+ .8byte .Ltext0 # DW_AT_low_pc
+ .8byte .Letext0-.Ltext0 # DW_AT_high_pc
+ .4byte .Ldebug_line0 # DW_AT_stmt_list
+ .ascii "/tmp/src/gdb/testsuite/gdb.dwarf2\0" # DW_AT_comp_dir
+ # Normally dwo_name would be "fission-reread.dwo".
+ # Simplification: Leave the DWO contents in the executable.
+ .ascii "fission-reread\0" # DW_AT_GNU_dwo_name
+ .4byte .Ldebug_pubnames0 # DW_AT_GNU_pubnames
+ .4byte .Ldebug_pubtypes0 # DW_AT_GNU_pubtypes
+ .4byte .Ldebug_addr0 # DW_AT_GNU_addr_base
+ .byte 0 # DW_AT_GNU_dwo_id
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 0
+ .byte 0
+.Lcu_end:
+
+ .section .debug_abbrev,"",@progbits
+.Lskeleton_debug_abbrev0:
+ .uleb128 0x1 # (abbrev code)
+ .uleb128 0x11 # (TAG: DW_TAG_compile_unit)
+ .byte 0 # DW_children_no
+ .uleb128 0x11 # (DW_AT_low_pc)
+ .uleb128 0x1 # (DW_FORM_addr)
+ .uleb128 0x12 # (DW_AT_high_pc)
+ .uleb128 0x7 # (DW_FORM_data8)
+ .uleb128 0x10 # (DW_AT_stmt_list)
+ .uleb128 0x17 # (DW_FORM_sec_offset)
+ .uleb128 0x1b # (DW_AT_comp_dir)
+ .uleb128 0x8 # (DW_FORM_string)
+ .uleb128 0x2130 # (DW_AT_GNU_dwo_name)
+ .uleb128 0x8 # (DW_FORM_string)
+ .uleb128 0x2134 # (DW_AT_GNU_pubnames)
+ .uleb128 0x17 # (DW_FORM_sec_offset)
+ .uleb128 0x2135 # (DW_AT_GNU_pubtypes)
+ .uleb128 0x17 # (DW_FORM_sec_offset)
+ .uleb128 0x2133 # (DW_AT_GNU_addr_base)
+ .uleb128 0x17 # (DW_FORM_sec_offset)
+ .uleb128 0x2131 # (DW_AT_GNU_dwo_id)
+ .uleb128 0x7 # (DW_FORM_data8)
+ .byte 0
+ .byte 0
+ .uleb128 0x2 # (abbrev code)
+ .uleb128 0x41 # (TAG: DW_TAG_type_unit)
+ .byte 0 # DW_children_no
+ .uleb128 0x1b # (DW_AT_comp_dir)
+ .uleb128 0x8 # (DW_FORM_string)
+ .uleb128 0x2130 # (DW_AT_GNU_dwo_name)
+ .uleb128 0x8 # (DW_FORM_string)
+ .uleb128 0x2134 # (DW_AT_GNU_pubnames)
+ .uleb128 0x17 # (DW_FORM_sec_offset)
+ .uleb128 0x2135 # (DW_AT_GNU_pubtypes)
+ .uleb128 0x17 # (DW_FORM_sec_offset)
+ .uleb128 0x2133 # (DW_AT_GNU_addr_base)
+ .uleb128 0x17 # (DW_FORM_sec_offset)
+ .byte 0
+ .byte 0
+ .byte 0 # end of skeleton .debug_abbrev
+ .section .debug_abbrev.dwo,"",@progbits
+.Ldebug_abbrev0:
+ .uleb128 0x1 # (abbrev code)
+ .uleb128 0x41 # (TAG: DW_TAG_type_unit)
+ .byte 0x1 # DW_children_yes
+ .uleb128 0x13 # (DW_AT_language)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x210f # (DW_AT_GNU_odr_signature)
+ .uleb128 0x7 # (DW_FORM_data8)
+ .uleb128 0x10 # (DW_AT_stmt_list)
+ .uleb128 0x17 # (DW_FORM_sec_offset)
+ .byte 0
+ .byte 0
+ .uleb128 0x2 # (abbrev code)
+ .uleb128 0x2 # (TAG: DW_TAG_class_type)
+ .byte 0x1 # DW_children_yes
+ .uleb128 0x3 # (DW_AT_name)
+ .uleb128 0x8 # (DW_FORM_string)
+ .uleb128 0xb # (DW_AT_byte_size)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3a # (DW_AT_decl_file)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3b # (DW_AT_decl_line)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x1 # (DW_AT_sibling)
+ .uleb128 0x13 # (DW_FORM_ref4)
+ .byte 0
+ .byte 0
+ .uleb128 0x3 # (abbrev code)
+ .uleb128 0xd # (TAG: DW_TAG_member)
+ .byte 0 # DW_children_no
+ .uleb128 0x3 # (DW_AT_name)
+ .uleb128 0x8 # (DW_FORM_string)
+ .uleb128 0x3a # (DW_AT_decl_file)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3b # (DW_AT_decl_line)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x49 # (DW_AT_type)
+ .uleb128 0x13 # (DW_FORM_ref4)
+ .uleb128 0x38 # (DW_AT_data_member_location)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x32 # (DW_AT_accessibility)
+ .uleb128 0xb # (DW_FORM_data1)
+ .byte 0
+ .byte 0
+ .uleb128 0x4 # (abbrev code)
+ .uleb128 0x24 # (TAG: DW_TAG_base_type)
+ .byte 0 # DW_children_no
+ .uleb128 0xb # (DW_AT_byte_size)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3e # (DW_AT_encoding)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3 # (DW_AT_name)
+ .uleb128 0x8 # (DW_FORM_string)
+ .byte 0
+ .byte 0
+ .uleb128 0x5 # (abbrev code)
+ .uleb128 0x11 # (TAG: DW_TAG_compile_unit)
+ .byte 0x1 # DW_children_yes
+ .uleb128 0x25 # (DW_AT_producer)
+ .uleb128 0x8 # (DW_FORM_string)
+ .uleb128 0x13 # (DW_AT_language)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3 # (DW_AT_name)
+ .uleb128 0x8 # (DW_FORM_string)
+ .uleb128 0x1b # (DW_AT_comp_dir)
+ .uleb128 0x8 # (DW_FORM_string)
+ .uleb128 0x2131 # (DW_AT_GNU_dwo_id)
+ .uleb128 0x7 # (DW_FORM_data8)
+ .byte 0
+ .byte 0
+ .uleb128 0x6 # (abbrev code)
+ .uleb128 0x2e # (TAG: DW_TAG_subprogram)
+ .byte 0 # DW_children_no
+ .uleb128 0x3f # (DW_AT_external)
+ .uleb128 0x19 # (DW_FORM_flag_present)
+ .uleb128 0x3 # (DW_AT_name)
+ .uleb128 0x8 # (DW_FORM_string)
+ .uleb128 0x3a # (DW_AT_decl_file)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3b # (DW_AT_decl_line)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x49 # (DW_AT_type)
+ .uleb128 0x13 # (DW_FORM_ref4)
+ .uleb128 0x11 # (DW_AT_low_pc)
+ .uleb128 0x1f01 # (DW_FORM_GNU_addr_index)
+ .uleb128 0x12 # (DW_AT_high_pc)
+ .uleb128 0x7 # (DW_FORM_data8)
+ .uleb128 0x40 # (DW_AT_frame_base)
+ .uleb128 0x18 # (DW_FORM_exprloc)
+ .byte 0
+ .byte 0
+ .uleb128 0x7 # (abbrev code)
+ .uleb128 0x34 # (TAG: DW_TAG_variable)
+ .byte 0 # DW_children_no
+ .uleb128 0x3 # (DW_AT_name)
+ .uleb128 0x8 # (DW_FORM_string)
+ .uleb128 0x3a # (DW_AT_decl_file)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3b # (DW_AT_decl_line)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x49 # (DW_AT_type)
+ .uleb128 0x20 # (DW_FORM_ref_sig8)
+ .uleb128 0x3f # (DW_AT_external)
+ .uleb128 0x19 # (DW_FORM_flag_present)
+ .uleb128 0x2 # (DW_AT_location)
+ .uleb128 0x18 # (DW_FORM_exprloc)
+ .byte 0
+ .byte 0
+
+ /* Manually inserted. */
+ .uleb128 0x8 /* abbrev code */
+ .uleb128 0x2 /* DW_TAG_class_type */
+ .byte 0x0 /* DW_has_children_no */
+ .uleb128 0x47 /* DW_AT_specification */
+ .uleb128 0x13 /* DW_FORM_ref4 */
+ .byte 0x0 /* Terminator */
+ .byte 0x0 /* Terminator */
+ /* End of manual insertion. */
+
+ .byte 0
+ .section .debug_pubnames,"",@progbits
+.Ldebug_pubnames0:
+ .4byte 0x1f # Length of Public Names Info
+ .2byte 0x2 # DWARF Version
+ .4byte .Lskeleton_debug_info0 # Offset of Compilation Unit Info
+ .4byte 0xb0 # Compilation Unit Length
+ .4byte 0x86 # DIE offset
+ .ascii "main\0" # external name
+ .4byte 0x9d # DIE offset
+ .ascii "baz\0" # external name
+ .4byte 0
+ .section .debug_pubtypes,"",@progbits
+.Ldebug_pubtypes0:
+ .4byte 0x1e # Length of Public Type Names Info
+ .2byte 0x2 # DWARF Version
+ .4byte .Lskeleton_debug_info0 # Offset of Compilation Unit Info
+ .4byte 0xb0 # Compilation Unit Length
+ .4byte 0x7f # DIE offset
+ .ascii "int\0" # external name
+ .4byte 0x25 # DIE offset
+ .ascii "foo\0" # external name
+ .4byte 0
+ .section .debug_aranges,"",@progbits
+ .4byte 0x2c # Length of Address Ranges Info
+ .2byte 0x2 # DWARF Version
+ .4byte .Lskeleton_debug_info0 # Offset of Compilation Unit Info
+ .byte 0x8 # Size of Address
+ .byte 0 # Size of Segment Descriptor
+ .2byte 0 # Pad to 16 byte boundary
+ .2byte 0
+ .8byte .Ltext0 # Address
+ .8byte .Letext0-.Ltext0 # Length
+ .8byte 0
+ .8byte 0
+ .section .debug_line,"",@progbits
+.Ldebug_line0:
+ .section .debug_line.dwo,"",@progbits
+.Lskeleton_debug_line0:
+ .4byte .LELT0-.LSLT0 # Length of Source Line Info
+.LSLT0:
+ .2byte 0x4 # DWARF Version
+ .4byte .LELTP0-.LASLTP0 # Prolog Length
+.LASLTP0:
+ .byte 0x1 # Minimum Instruction Length
+ .byte 0x1 # Maximum Operations Per Instruction
+ .byte 0x1 # Default is_stmt_start flag
+ .byte 0xf6 # Line Base Value (Special Opcodes)
+ .byte 0xf5 # Line Range Value (Special Opcodes)
+ .byte 0xa # Special Opcode Base
+ .byte 0 # opcode: 0x1 has 0 args
+ .byte 0x1 # opcode: 0x2 has 1 args
+ .byte 0x1 # opcode: 0x3 has 1 args
+ .byte 0x1 # opcode: 0x4 has 1 args
+ .byte 0x1 # opcode: 0x5 has 1 args
+ .byte 0 # opcode: 0x6 has 0 args
+ .byte 0 # opcode: 0x7 has 0 args
+ .byte 0 # opcode: 0x8 has 0 args
+ .byte 0x1 # opcode: 0x9 has 1 args
+ .byte 0 # End directory table
+ .ascii "fission-reread.cc\0" # File Entry: 0x1
+ .uleb128 0
+ .uleb128 0
+ .uleb128 0
+ .byte 0 # End file name table
+.LELTP0:
+.LELT0:
+ .section .debug_addr,"",@progbits
+.Ldebug_addr0:
+ .8byte .LFB0 # DW_AT_low_pc
+ .8byte baz # DW_AT_location
+
+ .section .note.GNU-stack,"",@progbits
Index: testsuite/gdb.dwarf2/fission-reread.exp
===================================================================
RCS file: testsuite/gdb.dwarf2/fission-reread.exp
diff -N testsuite/gdb.dwarf2/fission-reread.exp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ testsuite/gdb.dwarf2/fission-reread.exp 1 Jul 2012 01:52:47 -0000
@@ -0,0 +1,44 @@
+# Copyright 2012 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+load_lib dwarf.exp
+
+# This test can only be run on targets which support DWARF-2 and use gas.
+if ![dwarf2_support] {
+ return 0
+}
+
+set basename "fission-reread"
+
+standard_testfile .S
+
+# IWBN to use prepare_for_testing here, but we need to set debug-file-directory
+# before we load the binary.
+
+if { [build_executable "$testfile.exp" "$testfile" "$srcfile" {nodebug}] } {
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+# Set debug-file-directory so we find the dwo file.
+gdb_test_no_output "set debug-file-directory $subdir"
+gdb_load [standard_output_file $testfile]
+
+gdb_test "break main" "Breakpoint.*at.*"
+
+# If we get this far gdb didn't crash, nor did an error occur.
+pass $testfile
^ permalink raw reply [flat|nested] 11+ messages in thread
* [patch 1/2] testcase: Make it -m32 compatible [Re: [commit] Fix rereading of DWO DIEs]
2012-07-01 2:18 [commit] Fix rereading of DWO DIEs Doug Evans
@ 2012-07-02 8:34 ` Jan Kratochvil
2012-07-02 8:38 ` Jan Kratochvil
2012-07-02 20:10 ` [commit] " Jan Kratochvil
2012-07-02 8:35 ` [patch 2/2] testcase: Make it cross-arch " Jan Kratochvil
2012-07-19 8:12 ` [commit] Fix rereading of DWO DIEs Andreas Schwab
2 siblings, 2 replies; 11+ messages in thread
From: Jan Kratochvil @ 2012-07-02 8:34 UTC (permalink / raw)
To: Doug Evans; +Cc: gdb-patches
On Sun, 01 Jul 2012 04:18:09 +0200, Doug Evans wrote:
> testsuite/
> * gdb.dwarf2/fission-reread.S: New file.
> * gdb.dwarf2/fission-reread.exp: New file.
With any configuration for 32-bit targets:
+Running gdb/testsuite/gdb.dwarf2/fission-reread.exp ...
+gdb compile failed, fission-reread.cc: Assembler messages:
+fission-reread.cc:206: Error: cannot represent relocation type BFD_RELOC_64
+fission-reread.cc:418: Error: cannot represent relocation type BFD_RELOC_64
+fission-reread.cc:456: Error: cannot represent relocation type BFD_RELOC_64
+fission-reread.cc:457: Error: cannot represent relocation type BFD_RELOC_64
+UNTESTED: gdb.dwarf2/fission-reread.exp: fission-reread.exp
As it is arch-independent testcase it does not need to limit itself to 64-bit
targets.
Adjusted also other common cross-arch incompatibilities and needless
GNU-stack.
I will check it in today. Verified it still FAILs without the fix.
Thanks,
Jan
gdb/testsuite/
2012-07-02 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.dwarf2/fission-reread.S: Remove .section attributes.
Change CU pointer size to 4 bytes, adjust .8byte to .4byte. Remove
.note.GNU-stack.
--- a/gdb/testsuite/gdb.dwarf2/fission-reread.S
+++ b/gdb/testsuite/gdb.dwarf2/fission-reread.S
@@ -61,12 +61,12 @@ main:
.size main, .-main
.Letext0:
- .section .debug_types.dwo,"G",@progbits,wt.198b7eaccef12290,comdat
+ .section .debug_types.dwo
.Ltu_start_dwo:
.4byte .Ltu_end_dwo - .Ltu_start_dwo - 4 # Length of Compilation Unit Info
.2byte 0x4 # DWARF version number
.4byte .Ldebug_abbrev0 # Offset Into Abbrev. Section
- .byte 0x8 # Pointer Size (in bytes)
+ .byte 0x4 # Pointer Size (in bytes)
.byte 0x19 # Type Signature
.byte 0x8b
.byte 0x7e
@@ -117,12 +117,12 @@ main:
.byte 0 # end of children of DIE 0x17
.Ltu_end_dwo:
- .section .debug_types,"G",@progbits,wt.198b7eaccef12290,comdat
+ .section .debug_types
.Ltu_start:
.4byte .Ltu_end - .Ltu_start - 4 # Length of Type Unit Info
.2byte 0x4 # DWARF version number
.4byte .Lskeleton_debug_abbrev0 # Offset Into Abbrev. Section
- .byte 0x8 # Pointer Size (in bytes)
+ .byte 0x4 # Pointer Size (in bytes)
.byte 0x19 # Type Signature
.byte 0x8b
.byte 0x7e
@@ -142,12 +142,12 @@ main:
.4byte .Ldebug_addr0 # DW_AT_GNU_addr_base
.Ltu_end:
- .section .debug_info.dwo,"",@progbits
+ .section .debug_info.dwo
.Lcu_start_dwo:
.4byte .Lcu_end_dwo - .Lcu_start_dwo - 4 # Length of Compilation Unit Info
.2byte 0x4 # DWARF version number
.4byte .Ldebug_abbrev0 # Offset Into Abbrev. Section
- .byte 0x8 # Pointer Size (in bytes)
+ .byte 0x4 # Pointer Size (in bytes)
.uleb128 0x5 # (DIE (0xb) DW_TAG_compile_unit)
.ascii "GNU C++ 4.6.x-fission\0" # DW_AT_producer
.byte 0x4 # DW_AT_language
@@ -173,7 +173,7 @@ main:
.byte 0xa # DW_AT_decl_line
.4byte .Lcu_int # DW_AT_type
.uleb128 0 # DW_AT_low_pc
- .8byte .LFE0-.LFB0 # DW_AT_high_pc
+ .4byte .LFE0-.LFB0 # DW_AT_high_pc
.uleb128 0x1 # DW_AT_frame_base
.byte 0x9c # DW_OP_call_frame_cfa
.uleb128 0x7 # (DIE (0x9d) DW_TAG_variable)
@@ -195,16 +195,16 @@ main:
.byte 0 # end of children of DIE 0xb
.Lcu_end_dwo:
- .section .debug_info,"",@progbits
+ .section .debug_info
.Lskeleton_debug_info0:
.Lcu_start:
.4byte .Lcu_end - .Lcu_start - 4 # Length of Compilation Unit Info
.2byte 0x4 # DWARF version number
.4byte .Lskeleton_debug_abbrev0 # Offset Into Abbrev. Section
- .byte 0x8 # Pointer Size (in bytes)
+ .byte 0x4 # Pointer Size (in bytes)
.uleb128 0x1 # (DIE (0) DW_TAG_compile_unit)
- .8byte .Ltext0 # DW_AT_low_pc
- .8byte .Letext0-.Ltext0 # DW_AT_high_pc
+ .4byte .Ltext0 # DW_AT_low_pc
+ .4byte .Letext0-.Ltext0 # DW_AT_high_pc
.4byte .Ldebug_line0 # DW_AT_stmt_list
.ascii "/tmp/src/gdb/testsuite/gdb.dwarf2\0" # DW_AT_comp_dir
# Normally dwo_name would be "fission-reread.dwo".
@@ -223,7 +223,7 @@ main:
.byte 0
.Lcu_end:
- .section .debug_abbrev,"",@progbits
+ .section .debug_abbrev
.Lskeleton_debug_abbrev0:
.uleb128 0x1 # (abbrev code)
.uleb128 0x11 # (TAG: DW_TAG_compile_unit)
@@ -264,7 +264,7 @@ main:
.byte 0
.byte 0
.byte 0 # end of skeleton .debug_abbrev
- .section .debug_abbrev.dwo,"",@progbits
+ .section .debug_abbrev.dwo
.Ldebug_abbrev0:
.uleb128 0x1 # (abbrev code)
.uleb128 0x41 # (TAG: DW_TAG_type_unit)
@@ -385,7 +385,7 @@ main:
/* End of manual insertion. */
.byte 0
- .section .debug_pubnames,"",@progbits
+ .section .debug_pubnames
.Ldebug_pubnames0:
.4byte 0x1f # Length of Public Names Info
.2byte 0x2 # DWARF Version
@@ -396,7 +396,7 @@ main:
.4byte 0x9d # DIE offset
.ascii "baz\0" # external name
.4byte 0
- .section .debug_pubtypes,"",@progbits
+ .section .debug_pubtypes
.Ldebug_pubtypes0:
.4byte 0x1e # Length of Public Type Names Info
.2byte 0x2 # DWARF Version
@@ -407,7 +407,7 @@ main:
.4byte 0x25 # DIE offset
.ascii "foo\0" # external name
.4byte 0
- .section .debug_aranges,"",@progbits
+ .section .debug_aranges
.4byte 0x2c # Length of Address Ranges Info
.2byte 0x2 # DWARF Version
.4byte .Lskeleton_debug_info0 # Offset of Compilation Unit Info
@@ -415,13 +415,13 @@ main:
.byte 0 # Size of Segment Descriptor
.2byte 0 # Pad to 16 byte boundary
.2byte 0
- .8byte .Ltext0 # Address
- .8byte .Letext0-.Ltext0 # Length
- .8byte 0
- .8byte 0
- .section .debug_line,"",@progbits
+ .4byte .Ltext0 # Address
+ .4byte .Letext0-.Ltext0 # Length
+ .4byte 0
+ .4byte 0
+ .section .debug_line
.Ldebug_line0:
- .section .debug_line.dwo,"",@progbits
+ .section .debug_line.dwo
.Lskeleton_debug_line0:
.4byte .LELT0-.LSLT0 # Length of Source Line Info
.LSLT0:
@@ -451,9 +451,7 @@ main:
.byte 0 # End file name table
.LELTP0:
.LELT0:
- .section .debug_addr,"",@progbits
+ .section .debug_addr
.Ldebug_addr0:
- .8byte .LFB0 # DW_AT_low_pc
- .8byte baz # DW_AT_location
-
- .section .note.GNU-stack,"",@progbits
+ .4byte .LFB0 # DW_AT_low_pc
+ .4byte baz # DW_AT_location
^ permalink raw reply [flat|nested] 11+ messages in thread
* [patch 2/2] testcase: Make it cross-arch compatible [Re: [commit] Fix rereading of DWO DIEs]
2012-07-01 2:18 [commit] Fix rereading of DWO DIEs Doug Evans
2012-07-02 8:34 ` [patch 1/2] testcase: Make it -m32 compatible [Re: [commit] Fix rereading of DWO DIEs] Jan Kratochvil
@ 2012-07-02 8:35 ` Jan Kratochvil
2012-07-02 20:11 ` [commit] " Jan Kratochvil
2012-07-19 8:12 ` [commit] Fix rereading of DWO DIEs Andreas Schwab
2 siblings, 1 reply; 11+ messages in thread
From: Jan Kratochvil @ 2012-07-02 8:35 UTC (permalink / raw)
To: Doug Evans; +Cc: gdb-patches
On Sun, 01 Jul 2012 04:18:09 +0200, Doug Evans wrote:
> testsuite/
> * gdb.dwarf2/fission-reread.S: New file.
> * gdb.dwarf2/fission-reread.exp: New file.
Adjusted also other common cross-arch incompatibilities.
I will check it in today. Verified it still FAILs without the fix.
Thanks,
Jan
gdb/testsuite/
2012-07-02 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.dwarf2/fission-reread.S: Change # comments to /* */ comments.
--- a/gdb/testsuite/gdb.dwarf2/fission-reread.S
+++ b/gdb/testsuite/gdb.dwarf2/fission-reread.S
@@ -63,11 +63,11 @@ main:
.section .debug_types.dwo
.Ltu_start_dwo:
- .4byte .Ltu_end_dwo - .Ltu_start_dwo - 4 # Length of Compilation Unit Info
- .2byte 0x4 # DWARF version number
- .4byte .Ldebug_abbrev0 # Offset Into Abbrev. Section
- .byte 0x4 # Pointer Size (in bytes)
- .byte 0x19 # Type Signature
+ .4byte .Ltu_end_dwo - .Ltu_start_dwo - 4 /* Length of Compilation Unit Info */
+ .2byte 0x4 /* DWARF version number */
+ .4byte .Ldebug_abbrev0 /* Offset Into Abbrev. Section */
+ .byte 0x4 /* Pointer Size (in bytes) */
+ .byte 0x19 /* Type Signature */
.byte 0x8b
.byte 0x7e
.byte 0xac
@@ -75,10 +75,10 @@ main:
.byte 0xf1
.byte 0x22
.byte 0x90
- .4byte .Ltu_class_type - .Ltu_start_dwo # Offset to Type DIE
- .uleb128 0x1 # (DIE (0x17) DW_TAG_type_unit)
- .byte 0x4 # DW_AT_language
- .byte 0x73 # DW_AT_GNU_odr_signature
+ .4byte .Ltu_class_type - .Ltu_start_dwo /* Offset to Type DIE */
+ .uleb128 0x1 /* (DIE (0x17) DW_TAG_type_unit) */
+ .byte 0x4 /* DW_AT_language */
+ .byte 0x73 /* DW_AT_GNU_odr_signature */
.byte 0xea
.byte 0x85
.byte 0x23
@@ -86,7 +86,7 @@ main:
.byte 0x8a
.byte 0x7e
.byte 0x87
- .4byte .Lskeleton_debug_line0 # DW_AT_stmt_list
+ .4byte .Lskeleton_debug_line0 /* DW_AT_stmt_list */
/* Manually inserted to have a DW_AT_specification refering to
something and appearing ahead of it. */
@@ -95,35 +95,35 @@ main:
/* End of manual insertion */
.Ltu_class_type:
- .uleb128 0x2 # (DIE (0x25) DW_TAG_class_type)
- .ascii "foo\0" # DW_AT_name
- .byte 0x4 # DW_AT_byte_size
- .byte 0x1 # DW_AT_decl_file (fission-reread.cc)
- .byte 0x1 # DW_AT_decl_line
- .4byte .Ltu_int # DW_AT_sibling
- .uleb128 0x3 # (DIE (0x31) DW_TAG_member)
- .ascii "bar\0" # DW_AT_name
- .byte 0x1 # DW_AT_decl_file (fission-reread.cc)
- .byte 0x4 # DW_AT_decl_line
- .4byte .Ltu_int # DW_AT_type
- .byte 0 # DW_AT_data_member_location
- .byte 0x1 # DW_AT_accessibility
- .byte 0 # end of children of DIE 0x25
+ .uleb128 0x2 /* (DIE (0x25) DW_TAG_class_type) */
+ .ascii "foo\0" /* DW_AT_name */
+ .byte 0x4 /* DW_AT_byte_size */
+ .byte 0x1 /* DW_AT_decl_file (fission-reread.cc) */
+ .byte 0x1 /* DW_AT_decl_line */
+ .4byte .Ltu_int /* DW_AT_sibling */
+ .uleb128 0x3 /* (DIE (0x31) DW_TAG_member) */
+ .ascii "bar\0" /* DW_AT_name */
+ .byte 0x1 /* DW_AT_decl_file (fission-reread.cc) */
+ .byte 0x4 /* DW_AT_decl_line */
+ .4byte .Ltu_int /* DW_AT_type */
+ .byte 0 /* DW_AT_data_member_location */
+ .byte 0x1 /* DW_AT_accessibility */
+ .byte 0 /* end of children of DIE 0x25 */
.Ltu_int:
- .uleb128 0x4 # (DIE (0x3f) DW_TAG_base_type)
- .byte 0x4 # DW_AT_byte_size
- .byte 0x5 # DW_AT_encoding
- .ascii "int\0" # DW_AT_name
- .byte 0 # end of children of DIE 0x17
+ .uleb128 0x4 /* (DIE (0x3f) DW_TAG_base_type) */
+ .byte 0x4 /* DW_AT_byte_size */
+ .byte 0x5 /* DW_AT_encoding */
+ .ascii "int\0" /* DW_AT_name */
+ .byte 0 /* end of children of DIE 0x17 */
.Ltu_end_dwo:
.section .debug_types
.Ltu_start:
- .4byte .Ltu_end - .Ltu_start - 4 # Length of Type Unit Info
- .2byte 0x4 # DWARF version number
- .4byte .Lskeleton_debug_abbrev0 # Offset Into Abbrev. Section
- .byte 0x4 # Pointer Size (in bytes)
- .byte 0x19 # Type Signature
+ .4byte .Ltu_end - .Ltu_start - 4 /* Length of Type Unit Info */
+ .2byte 0x4 /* DWARF version number */
+ .4byte .Lskeleton_debug_abbrev0 /* Offset Into Abbrev. Section */
+ .byte 0x4 /* Pointer Size (in bytes) */
+ .byte 0x19 /* Type Signature */
.byte 0x8b
.byte 0x7e
.byte 0xac
@@ -131,29 +131,29 @@ main:
.byte 0xf1
.byte 0x22
.byte 0x90
- .4byte 0 # Offset to Type DIE
- .uleb128 0x2 # (DIE (0) DW_TAG_type_unit)
- .ascii "/tmp/src/gdb/testsuite/gdb.dwarf2\0" # DW_AT_comp_dir
- # Normally dwo_name would be "fission-reread.dwo".
- # Simplification: Leave the DWO contents in the executable.
- .ascii "fission-reread\0" # DW_AT_GNU_dwo_name
- .4byte .Ldebug_pubnames0 # DW_AT_GNU_pubnames
- .4byte .Ldebug_pubtypes0 # DW_AT_GNU_pubtypes
- .4byte .Ldebug_addr0 # DW_AT_GNU_addr_base
+ .4byte 0 /* Offset to Type DIE */
+ .uleb128 0x2 /* (DIE (0) DW_TAG_type_unit) */
+ .ascii "/tmp/src/gdb/testsuite/gdb.dwarf2\0" /* DW_AT_comp_dir */
+ /* Normally dwo_name would be "fission-reread.dwo". */
+ /* Simplification: Leave the DWO contents in the executable. */
+ .ascii "fission-reread\0" /* DW_AT_GNU_dwo_name */
+ .4byte .Ldebug_pubnames0 /* DW_AT_GNU_pubnames */
+ .4byte .Ldebug_pubtypes0 /* DW_AT_GNU_pubtypes */
+ .4byte .Ldebug_addr0 /* DW_AT_GNU_addr_base */
.Ltu_end:
.section .debug_info.dwo
.Lcu_start_dwo:
- .4byte .Lcu_end_dwo - .Lcu_start_dwo - 4 # Length of Compilation Unit Info
- .2byte 0x4 # DWARF version number
- .4byte .Ldebug_abbrev0 # Offset Into Abbrev. Section
- .byte 0x4 # Pointer Size (in bytes)
- .uleb128 0x5 # (DIE (0xb) DW_TAG_compile_unit)
- .ascii "GNU C++ 4.6.x-fission\0" # DW_AT_producer
- .byte 0x4 # DW_AT_language
- .ascii "fission-reread.cc\0" # DW_AT_name
- .ascii "/tmp/src/gdb/testsuite/gdb.dwarf2\0" # DW_AT_comp_dir
- .byte 0 # DW_AT_GNU_dwo_id
+ .4byte .Lcu_end_dwo - .Lcu_start_dwo - 4 /* Length of Compilation Unit Info */
+ .2byte 0x4 /* DWARF version number */
+ .4byte .Ldebug_abbrev0 /* Offset Into Abbrev. Section */
+ .byte 0x4 /* Pointer Size (in bytes) */
+ .uleb128 0x5 /* (DIE (0xb) DW_TAG_compile_unit) */
+ .ascii "GNU C++ 4.6.x-fission\0" /* DW_AT_producer */
+ .byte 0x4 /* DW_AT_language */
+ .ascii "fission-reread.cc\0" /* DW_AT_name */
+ .ascii "/tmp/src/gdb/testsuite/gdb.dwarf2\0" /* DW_AT_comp_dir */
+ .byte 0 /* DW_AT_GNU_dwo_id */
.byte 0
.byte 0
.byte 0
@@ -162,25 +162,25 @@ main:
.byte 0
.byte 0
.Lcu_int:
- .uleb128 0x4 # (DIE (0x7f) DW_TAG_base_type)
- .byte 0x4 # DW_AT_byte_size
- .byte 0x5 # DW_AT_encoding
- .ascii "int\0" # DW_AT_name
- .uleb128 0x6 # (DIE (0x86) DW_TAG_subprogram)
- # DW_AT_external
- .ascii "main\0" # DW_AT_name
- .byte 0x1 # DW_AT_decl_file (fission-reread.cc)
- .byte 0xa # DW_AT_decl_line
- .4byte .Lcu_int # DW_AT_type
- .uleb128 0 # DW_AT_low_pc
- .4byte .LFE0-.LFB0 # DW_AT_high_pc
- .uleb128 0x1 # DW_AT_frame_base
- .byte 0x9c # DW_OP_call_frame_cfa
- .uleb128 0x7 # (DIE (0x9d) DW_TAG_variable)
- .ascii "baz\0" # DW_AT_name
- .byte 0x1 # DW_AT_decl_file (fission-reread.cc)
- .byte 0x7 # DW_AT_decl_line
- .byte 0x19 # DW_AT_type
+ .uleb128 0x4 /* (DIE (0x7f) DW_TAG_base_type) */
+ .byte 0x4 /* DW_AT_byte_size */
+ .byte 0x5 /* DW_AT_encoding */
+ .ascii "int\0" /* DW_AT_name */
+ .uleb128 0x6 /* (DIE (0x86) DW_TAG_subprogram) */
+ /* DW_AT_external */
+ .ascii "main\0" /* DW_AT_name */
+ .byte 0x1 /* DW_AT_decl_file (fission-reread.cc) */
+ .byte 0xa /* DW_AT_decl_line */
+ .4byte .Lcu_int /* DW_AT_type */
+ .uleb128 0 /* DW_AT_low_pc */
+ .4byte .LFE0-.LFB0 /* DW_AT_high_pc */
+ .uleb128 0x1 /* DW_AT_frame_base */
+ .byte 0x9c /* DW_OP_call_frame_cfa */
+ .uleb128 0x7 /* (DIE (0x9d) DW_TAG_variable) */
+ .ascii "baz\0" /* DW_AT_name */
+ .byte 0x1 /* DW_AT_decl_file (fission-reread.cc) */
+ .byte 0x7 /* DW_AT_decl_line */
+ .byte 0x19 /* DW_AT_type */
.byte 0x8b
.byte 0x7e
.byte 0xac
@@ -188,32 +188,32 @@ main:
.byte 0xf1
.byte 0x22
.byte 0x90
- # DW_AT_external
- .uleb128 0x2 # DW_AT_location
- .byte 0xfb # DW_OP_GNU_addr_index
- .uleb128 0x1 # (index into .debug_addr)
- .byte 0 # end of children of DIE 0xb
+ /* DW_AT_external */
+ .uleb128 0x2 /* DW_AT_location */
+ .byte 0xfb /* DW_OP_GNU_addr_index */
+ .uleb128 0x1 /* (index into .debug_addr) */
+ .byte 0 /* end of children of DIE 0xb */
.Lcu_end_dwo:
.section .debug_info
.Lskeleton_debug_info0:
.Lcu_start:
- .4byte .Lcu_end - .Lcu_start - 4 # Length of Compilation Unit Info
- .2byte 0x4 # DWARF version number
- .4byte .Lskeleton_debug_abbrev0 # Offset Into Abbrev. Section
- .byte 0x4 # Pointer Size (in bytes)
- .uleb128 0x1 # (DIE (0) DW_TAG_compile_unit)
- .4byte .Ltext0 # DW_AT_low_pc
- .4byte .Letext0-.Ltext0 # DW_AT_high_pc
- .4byte .Ldebug_line0 # DW_AT_stmt_list
- .ascii "/tmp/src/gdb/testsuite/gdb.dwarf2\0" # DW_AT_comp_dir
- # Normally dwo_name would be "fission-reread.dwo".
- # Simplification: Leave the DWO contents in the executable.
- .ascii "fission-reread\0" # DW_AT_GNU_dwo_name
- .4byte .Ldebug_pubnames0 # DW_AT_GNU_pubnames
- .4byte .Ldebug_pubtypes0 # DW_AT_GNU_pubtypes
- .4byte .Ldebug_addr0 # DW_AT_GNU_addr_base
- .byte 0 # DW_AT_GNU_dwo_id
+ .4byte .Lcu_end - .Lcu_start - 4 /* Length of Compilation Unit Info */
+ .2byte 0x4 /* DWARF version number */
+ .4byte .Lskeleton_debug_abbrev0 /* Offset Into Abbrev. Section */
+ .byte 0x4 /* Pointer Size (in bytes) */
+ .uleb128 0x1 /* (DIE (0) DW_TAG_compile_unit) */
+ .4byte .Ltext0 /* DW_AT_low_pc */
+ .4byte .Letext0-.Ltext0 /* DW_AT_high_pc */
+ .4byte .Ldebug_line0 /* DW_AT_stmt_list */
+ .ascii "/tmp/src/gdb/testsuite/gdb.dwarf2\0" /* DW_AT_comp_dir */
+ /* Normally dwo_name would be "fission-reread.dwo". */
+ /* Simplification: Leave the DWO contents in the executable. */
+ .ascii "fission-reread\0" /* DW_AT_GNU_dwo_name */
+ .4byte .Ldebug_pubnames0 /* DW_AT_GNU_pubnames */
+ .4byte .Ldebug_pubtypes0 /* DW_AT_GNU_pubtypes */
+ .4byte .Ldebug_addr0 /* DW_AT_GNU_addr_base */
+ .byte 0 /* DW_AT_GNU_dwo_id */
.byte 0
.byte 0
.byte 0
@@ -225,152 +225,152 @@ main:
.section .debug_abbrev
.Lskeleton_debug_abbrev0:
- .uleb128 0x1 # (abbrev code)
- .uleb128 0x11 # (TAG: DW_TAG_compile_unit)
- .byte 0 # DW_children_no
- .uleb128 0x11 # (DW_AT_low_pc)
- .uleb128 0x1 # (DW_FORM_addr)
- .uleb128 0x12 # (DW_AT_high_pc)
- .uleb128 0x7 # (DW_FORM_data8)
- .uleb128 0x10 # (DW_AT_stmt_list)
- .uleb128 0x17 # (DW_FORM_sec_offset)
- .uleb128 0x1b # (DW_AT_comp_dir)
- .uleb128 0x8 # (DW_FORM_string)
- .uleb128 0x2130 # (DW_AT_GNU_dwo_name)
- .uleb128 0x8 # (DW_FORM_string)
- .uleb128 0x2134 # (DW_AT_GNU_pubnames)
- .uleb128 0x17 # (DW_FORM_sec_offset)
- .uleb128 0x2135 # (DW_AT_GNU_pubtypes)
- .uleb128 0x17 # (DW_FORM_sec_offset)
- .uleb128 0x2133 # (DW_AT_GNU_addr_base)
- .uleb128 0x17 # (DW_FORM_sec_offset)
- .uleb128 0x2131 # (DW_AT_GNU_dwo_id)
- .uleb128 0x7 # (DW_FORM_data8)
- .byte 0
- .byte 0
- .uleb128 0x2 # (abbrev code)
- .uleb128 0x41 # (TAG: DW_TAG_type_unit)
- .byte 0 # DW_children_no
- .uleb128 0x1b # (DW_AT_comp_dir)
- .uleb128 0x8 # (DW_FORM_string)
- .uleb128 0x2130 # (DW_AT_GNU_dwo_name)
- .uleb128 0x8 # (DW_FORM_string)
- .uleb128 0x2134 # (DW_AT_GNU_pubnames)
- .uleb128 0x17 # (DW_FORM_sec_offset)
- .uleb128 0x2135 # (DW_AT_GNU_pubtypes)
- .uleb128 0x17 # (DW_FORM_sec_offset)
- .uleb128 0x2133 # (DW_AT_GNU_addr_base)
- .uleb128 0x17 # (DW_FORM_sec_offset)
- .byte 0
- .byte 0
- .byte 0 # end of skeleton .debug_abbrev
+ .uleb128 0x1 /* (abbrev code) */
+ .uleb128 0x11 /* (TAG: DW_TAG_compile_unit) */
+ .byte 0 /* DW_children_no */
+ .uleb128 0x11 /* (DW_AT_low_pc) */
+ .uleb128 0x1 /* (DW_FORM_addr) */
+ .uleb128 0x12 /* (DW_AT_high_pc) */
+ .uleb128 0x7 /* (DW_FORM_data8) */
+ .uleb128 0x10 /* (DW_AT_stmt_list) */
+ .uleb128 0x17 /* (DW_FORM_sec_offset) */
+ .uleb128 0x1b /* (DW_AT_comp_dir) */
+ .uleb128 0x8 /* (DW_FORM_string) */
+ .uleb128 0x2130 /* (DW_AT_GNU_dwo_name) */
+ .uleb128 0x8 /* (DW_FORM_string) */
+ .uleb128 0x2134 /* (DW_AT_GNU_pubnames) */
+ .uleb128 0x17 /* (DW_FORM_sec_offset) */
+ .uleb128 0x2135 /* (DW_AT_GNU_pubtypes) */
+ .uleb128 0x17 /* (DW_FORM_sec_offset) */
+ .uleb128 0x2133 /* (DW_AT_GNU_addr_base) */
+ .uleb128 0x17 /* (DW_FORM_sec_offset) */
+ .uleb128 0x2131 /* (DW_AT_GNU_dwo_id) */
+ .uleb128 0x7 /* (DW_FORM_data8) */
+ .byte 0
+ .byte 0
+ .uleb128 0x2 /* (abbrev code) */
+ .uleb128 0x41 /* (TAG: DW_TAG_type_unit) */
+ .byte 0 /* DW_children_no */
+ .uleb128 0x1b /* (DW_AT_comp_dir) */
+ .uleb128 0x8 /* (DW_FORM_string) */
+ .uleb128 0x2130 /* (DW_AT_GNU_dwo_name) */
+ .uleb128 0x8 /* (DW_FORM_string) */
+ .uleb128 0x2134 /* (DW_AT_GNU_pubnames) */
+ .uleb128 0x17 /* (DW_FORM_sec_offset) */
+ .uleb128 0x2135 /* (DW_AT_GNU_pubtypes) */
+ .uleb128 0x17 /* (DW_FORM_sec_offset) */
+ .uleb128 0x2133 /* (DW_AT_GNU_addr_base) */
+ .uleb128 0x17 /* (DW_FORM_sec_offset) */
+ .byte 0
+ .byte 0
+ .byte 0 /* end of skeleton .debug_abbrev */
.section .debug_abbrev.dwo
.Ldebug_abbrev0:
- .uleb128 0x1 # (abbrev code)
- .uleb128 0x41 # (TAG: DW_TAG_type_unit)
- .byte 0x1 # DW_children_yes
- .uleb128 0x13 # (DW_AT_language)
- .uleb128 0xb # (DW_FORM_data1)
- .uleb128 0x210f # (DW_AT_GNU_odr_signature)
- .uleb128 0x7 # (DW_FORM_data8)
- .uleb128 0x10 # (DW_AT_stmt_list)
- .uleb128 0x17 # (DW_FORM_sec_offset)
- .byte 0
- .byte 0
- .uleb128 0x2 # (abbrev code)
- .uleb128 0x2 # (TAG: DW_TAG_class_type)
- .byte 0x1 # DW_children_yes
- .uleb128 0x3 # (DW_AT_name)
- .uleb128 0x8 # (DW_FORM_string)
- .uleb128 0xb # (DW_AT_byte_size)
- .uleb128 0xb # (DW_FORM_data1)
- .uleb128 0x3a # (DW_AT_decl_file)
- .uleb128 0xb # (DW_FORM_data1)
- .uleb128 0x3b # (DW_AT_decl_line)
- .uleb128 0xb # (DW_FORM_data1)
- .uleb128 0x1 # (DW_AT_sibling)
- .uleb128 0x13 # (DW_FORM_ref4)
- .byte 0
- .byte 0
- .uleb128 0x3 # (abbrev code)
- .uleb128 0xd # (TAG: DW_TAG_member)
- .byte 0 # DW_children_no
- .uleb128 0x3 # (DW_AT_name)
- .uleb128 0x8 # (DW_FORM_string)
- .uleb128 0x3a # (DW_AT_decl_file)
- .uleb128 0xb # (DW_FORM_data1)
- .uleb128 0x3b # (DW_AT_decl_line)
- .uleb128 0xb # (DW_FORM_data1)
- .uleb128 0x49 # (DW_AT_type)
- .uleb128 0x13 # (DW_FORM_ref4)
- .uleb128 0x38 # (DW_AT_data_member_location)
- .uleb128 0xb # (DW_FORM_data1)
- .uleb128 0x32 # (DW_AT_accessibility)
- .uleb128 0xb # (DW_FORM_data1)
- .byte 0
- .byte 0
- .uleb128 0x4 # (abbrev code)
- .uleb128 0x24 # (TAG: DW_TAG_base_type)
- .byte 0 # DW_children_no
- .uleb128 0xb # (DW_AT_byte_size)
- .uleb128 0xb # (DW_FORM_data1)
- .uleb128 0x3e # (DW_AT_encoding)
- .uleb128 0xb # (DW_FORM_data1)
- .uleb128 0x3 # (DW_AT_name)
- .uleb128 0x8 # (DW_FORM_string)
- .byte 0
- .byte 0
- .uleb128 0x5 # (abbrev code)
- .uleb128 0x11 # (TAG: DW_TAG_compile_unit)
- .byte 0x1 # DW_children_yes
- .uleb128 0x25 # (DW_AT_producer)
- .uleb128 0x8 # (DW_FORM_string)
- .uleb128 0x13 # (DW_AT_language)
- .uleb128 0xb # (DW_FORM_data1)
- .uleb128 0x3 # (DW_AT_name)
- .uleb128 0x8 # (DW_FORM_string)
- .uleb128 0x1b # (DW_AT_comp_dir)
- .uleb128 0x8 # (DW_FORM_string)
- .uleb128 0x2131 # (DW_AT_GNU_dwo_id)
- .uleb128 0x7 # (DW_FORM_data8)
- .byte 0
- .byte 0
- .uleb128 0x6 # (abbrev code)
- .uleb128 0x2e # (TAG: DW_TAG_subprogram)
- .byte 0 # DW_children_no
- .uleb128 0x3f # (DW_AT_external)
- .uleb128 0x19 # (DW_FORM_flag_present)
- .uleb128 0x3 # (DW_AT_name)
- .uleb128 0x8 # (DW_FORM_string)
- .uleb128 0x3a # (DW_AT_decl_file)
- .uleb128 0xb # (DW_FORM_data1)
- .uleb128 0x3b # (DW_AT_decl_line)
- .uleb128 0xb # (DW_FORM_data1)
- .uleb128 0x49 # (DW_AT_type)
- .uleb128 0x13 # (DW_FORM_ref4)
- .uleb128 0x11 # (DW_AT_low_pc)
- .uleb128 0x1f01 # (DW_FORM_GNU_addr_index)
- .uleb128 0x12 # (DW_AT_high_pc)
- .uleb128 0x7 # (DW_FORM_data8)
- .uleb128 0x40 # (DW_AT_frame_base)
- .uleb128 0x18 # (DW_FORM_exprloc)
- .byte 0
- .byte 0
- .uleb128 0x7 # (abbrev code)
- .uleb128 0x34 # (TAG: DW_TAG_variable)
- .byte 0 # DW_children_no
- .uleb128 0x3 # (DW_AT_name)
- .uleb128 0x8 # (DW_FORM_string)
- .uleb128 0x3a # (DW_AT_decl_file)
- .uleb128 0xb # (DW_FORM_data1)
- .uleb128 0x3b # (DW_AT_decl_line)
- .uleb128 0xb # (DW_FORM_data1)
- .uleb128 0x49 # (DW_AT_type)
- .uleb128 0x20 # (DW_FORM_ref_sig8)
- .uleb128 0x3f # (DW_AT_external)
- .uleb128 0x19 # (DW_FORM_flag_present)
- .uleb128 0x2 # (DW_AT_location)
- .uleb128 0x18 # (DW_FORM_exprloc)
+ .uleb128 0x1 /* (abbrev code) */
+ .uleb128 0x41 /* (TAG: DW_TAG_type_unit) */
+ .byte 0x1 /* DW_children_yes */
+ .uleb128 0x13 /* (DW_AT_language) */
+ .uleb128 0xb /* (DW_FORM_data1) */
+ .uleb128 0x210f /* (DW_AT_GNU_odr_signature) */
+ .uleb128 0x7 /* (DW_FORM_data8) */
+ .uleb128 0x10 /* (DW_AT_stmt_list) */
+ .uleb128 0x17 /* (DW_FORM_sec_offset) */
+ .byte 0
+ .byte 0
+ .uleb128 0x2 /* (abbrev code) */
+ .uleb128 0x2 /* (TAG: DW_TAG_class_type) */
+ .byte 0x1 /* DW_children_yes */
+ .uleb128 0x3 /* (DW_AT_name) */
+ .uleb128 0x8 /* (DW_FORM_string) */
+ .uleb128 0xb /* (DW_AT_byte_size) */
+ .uleb128 0xb /* (DW_FORM_data1) */
+ .uleb128 0x3a /* (DW_AT_decl_file) */
+ .uleb128 0xb /* (DW_FORM_data1) */
+ .uleb128 0x3b /* (DW_AT_decl_line) */
+ .uleb128 0xb /* (DW_FORM_data1) */
+ .uleb128 0x1 /* (DW_AT_sibling) */
+ .uleb128 0x13 /* (DW_FORM_ref4) */
+ .byte 0
+ .byte 0
+ .uleb128 0x3 /* (abbrev code) */
+ .uleb128 0xd /* (TAG: DW_TAG_member) */
+ .byte 0 /* DW_children_no */
+ .uleb128 0x3 /* (DW_AT_name) */
+ .uleb128 0x8 /* (DW_FORM_string) */
+ .uleb128 0x3a /* (DW_AT_decl_file) */
+ .uleb128 0xb /* (DW_FORM_data1) */
+ .uleb128 0x3b /* (DW_AT_decl_line) */
+ .uleb128 0xb /* (DW_FORM_data1) */
+ .uleb128 0x49 /* (DW_AT_type) */
+ .uleb128 0x13 /* (DW_FORM_ref4) */
+ .uleb128 0x38 /* (DW_AT_data_member_location) */
+ .uleb128 0xb /* (DW_FORM_data1) */
+ .uleb128 0x32 /* (DW_AT_accessibility) */
+ .uleb128 0xb /* (DW_FORM_data1) */
+ .byte 0
+ .byte 0
+ .uleb128 0x4 /* (abbrev code) */
+ .uleb128 0x24 /* (TAG: DW_TAG_base_type) */
+ .byte 0 /* DW_children_no */
+ .uleb128 0xb /* (DW_AT_byte_size) */
+ .uleb128 0xb /* (DW_FORM_data1) */
+ .uleb128 0x3e /* (DW_AT_encoding) */
+ .uleb128 0xb /* (DW_FORM_data1) */
+ .uleb128 0x3 /* (DW_AT_name) */
+ .uleb128 0x8 /* (DW_FORM_string) */
+ .byte 0
+ .byte 0
+ .uleb128 0x5 /* (abbrev code) */
+ .uleb128 0x11 /* (TAG: DW_TAG_compile_unit) */
+ .byte 0x1 /* DW_children_yes */
+ .uleb128 0x25 /* (DW_AT_producer) */
+ .uleb128 0x8 /* (DW_FORM_string) */
+ .uleb128 0x13 /* (DW_AT_language) */
+ .uleb128 0xb /* (DW_FORM_data1) */
+ .uleb128 0x3 /* (DW_AT_name) */
+ .uleb128 0x8 /* (DW_FORM_string) */
+ .uleb128 0x1b /* (DW_AT_comp_dir) */
+ .uleb128 0x8 /* (DW_FORM_string) */
+ .uleb128 0x2131 /* (DW_AT_GNU_dwo_id) */
+ .uleb128 0x7 /* (DW_FORM_data8) */
+ .byte 0
+ .byte 0
+ .uleb128 0x6 /* (abbrev code) */
+ .uleb128 0x2e /* (TAG: DW_TAG_subprogram) */
+ .byte 0 /* DW_children_no */
+ .uleb128 0x3f /* (DW_AT_external) */
+ .uleb128 0x19 /* (DW_FORM_flag_present) */
+ .uleb128 0x3 /* (DW_AT_name) */
+ .uleb128 0x8 /* (DW_FORM_string) */
+ .uleb128 0x3a /* (DW_AT_decl_file) */
+ .uleb128 0xb /* (DW_FORM_data1) */
+ .uleb128 0x3b /* (DW_AT_decl_line) */
+ .uleb128 0xb /* (DW_FORM_data1) */
+ .uleb128 0x49 /* (DW_AT_type) */
+ .uleb128 0x13 /* (DW_FORM_ref4) */
+ .uleb128 0x11 /* (DW_AT_low_pc) */
+ .uleb128 0x1f01 /* (DW_FORM_GNU_addr_index) */
+ .uleb128 0x12 /* (DW_AT_high_pc) */
+ .uleb128 0x7 /* (DW_FORM_data8) */
+ .uleb128 0x40 /* (DW_AT_frame_base) */
+ .uleb128 0x18 /* (DW_FORM_exprloc) */
+ .byte 0
+ .byte 0
+ .uleb128 0x7 /* (abbrev code) */
+ .uleb128 0x34 /* (TAG: DW_TAG_variable) */
+ .byte 0 /* DW_children_no */
+ .uleb128 0x3 /* (DW_AT_name) */
+ .uleb128 0x8 /* (DW_FORM_string) */
+ .uleb128 0x3a /* (DW_AT_decl_file) */
+ .uleb128 0xb /* (DW_FORM_data1) */
+ .uleb128 0x3b /* (DW_AT_decl_line) */
+ .uleb128 0xb /* (DW_FORM_data1) */
+ .uleb128 0x49 /* (DW_AT_type) */
+ .uleb128 0x20 /* (DW_FORM_ref_sig8) */
+ .uleb128 0x3f /* (DW_AT_external) */
+ .uleb128 0x19 /* (DW_FORM_flag_present) */
+ .uleb128 0x2 /* (DW_AT_location) */
+ .uleb128 0x18 /* (DW_FORM_exprloc) */
.byte 0
.byte 0
@@ -387,71 +387,71 @@ main:
.byte 0
.section .debug_pubnames
.Ldebug_pubnames0:
- .4byte 0x1f # Length of Public Names Info
- .2byte 0x2 # DWARF Version
- .4byte .Lskeleton_debug_info0 # Offset of Compilation Unit Info
- .4byte 0xb0 # Compilation Unit Length
- .4byte 0x86 # DIE offset
- .ascii "main\0" # external name
- .4byte 0x9d # DIE offset
- .ascii "baz\0" # external name
+ .4byte 0x1f /* Length of Public Names Info */
+ .2byte 0x2 /* DWARF Version */
+ .4byte .Lskeleton_debug_info0 /* Offset of Compilation Unit Info */
+ .4byte 0xb0 /* Compilation Unit Length */
+ .4byte 0x86 /* DIE offset */
+ .ascii "main\0" /* external name */
+ .4byte 0x9d /* DIE offset */
+ .ascii "baz\0" /* external name */
.4byte 0
.section .debug_pubtypes
.Ldebug_pubtypes0:
- .4byte 0x1e # Length of Public Type Names Info
- .2byte 0x2 # DWARF Version
- .4byte .Lskeleton_debug_info0 # Offset of Compilation Unit Info
- .4byte 0xb0 # Compilation Unit Length
- .4byte 0x7f # DIE offset
- .ascii "int\0" # external name
- .4byte 0x25 # DIE offset
- .ascii "foo\0" # external name
+ .4byte 0x1e /* Length of Public Type Names Info */
+ .2byte 0x2 /* DWARF Version */
+ .4byte .Lskeleton_debug_info0 /* Offset of Compilation Unit Info */
+ .4byte 0xb0 /* Compilation Unit Length */
+ .4byte 0x7f /* DIE offset */
+ .ascii "int\0" /* external name */
+ .4byte 0x25 /* DIE offset */
+ .ascii "foo\0" /* external name */
.4byte 0
.section .debug_aranges
- .4byte 0x2c # Length of Address Ranges Info
- .2byte 0x2 # DWARF Version
- .4byte .Lskeleton_debug_info0 # Offset of Compilation Unit Info
- .byte 0x8 # Size of Address
- .byte 0 # Size of Segment Descriptor
- .2byte 0 # Pad to 16 byte boundary
+ .4byte 0x2c /* Length of Address Ranges Info */
+ .2byte 0x2 /* DWARF Version */
+ .4byte .Lskeleton_debug_info0 /* Offset of Compilation Unit Info */
+ .byte 0x8 /* Size of Address */
+ .byte 0 /* Size of Segment Descriptor */
+ .2byte 0 /* Pad to 16 byte boundary */
.2byte 0
- .4byte .Ltext0 # Address
- .4byte .Letext0-.Ltext0 # Length
+ .4byte .Ltext0 /* Address */
+ .4byte .Letext0-.Ltext0 /* Length */
.4byte 0
.4byte 0
.section .debug_line
.Ldebug_line0:
.section .debug_line.dwo
.Lskeleton_debug_line0:
- .4byte .LELT0-.LSLT0 # Length of Source Line Info
+ .4byte .LELT0-.LSLT0 /* Length of Source Line Info */
.LSLT0:
- .2byte 0x4 # DWARF Version
- .4byte .LELTP0-.LASLTP0 # Prolog Length
+ .2byte 0x4 /* DWARF Version */
+ .4byte .LELTP0-.LASLTP0 /* Prolog Length */
.LASLTP0:
- .byte 0x1 # Minimum Instruction Length
- .byte 0x1 # Maximum Operations Per Instruction
- .byte 0x1 # Default is_stmt_start flag
- .byte 0xf6 # Line Base Value (Special Opcodes)
- .byte 0xf5 # Line Range Value (Special Opcodes)
- .byte 0xa # Special Opcode Base
- .byte 0 # opcode: 0x1 has 0 args
- .byte 0x1 # opcode: 0x2 has 1 args
- .byte 0x1 # opcode: 0x3 has 1 args
- .byte 0x1 # opcode: 0x4 has 1 args
- .byte 0x1 # opcode: 0x5 has 1 args
- .byte 0 # opcode: 0x6 has 0 args
- .byte 0 # opcode: 0x7 has 0 args
- .byte 0 # opcode: 0x8 has 0 args
- .byte 0x1 # opcode: 0x9 has 1 args
- .byte 0 # End directory table
- .ascii "fission-reread.cc\0" # File Entry: 0x1
+ .byte 0x1 /* Minimum Instruction Length */
+ .byte 0x1 /* Maximum Operations Per Instruction */
+ .byte 0x1 /* Default is_stmt_start flag */
+ .byte 0xf6 /* Line Base Value (Special Opcodes) */
+ .byte 0xf5 /* Line Range Value (Special Opcodes) */
+ .byte 0xa /* Special Opcode Base */
+ .byte 0 /* opcode: 0x1 has 0 args */
+ .byte 0x1 /* opcode: 0x2 has 1 args */
+ .byte 0x1 /* opcode: 0x3 has 1 args */
+ .byte 0x1 /* opcode: 0x4 has 1 args */
+ .byte 0x1 /* opcode: 0x5 has 1 args */
+ .byte 0 /* opcode: 0x6 has 0 args */
+ .byte 0 /* opcode: 0x7 has 0 args */
+ .byte 0 /* opcode: 0x8 has 0 args */
+ .byte 0x1 /* opcode: 0x9 has 1 args */
+ .byte 0 /* End directory table */
+ .ascii "fission-reread.cc\0" /* File Entry: 0x1 */
.uleb128 0
.uleb128 0
.uleb128 0
- .byte 0 # End file name table
+ .byte 0 /* End file name table */
.LELTP0:
.LELT0:
.section .debug_addr
.Ldebug_addr0:
- .4byte .LFB0 # DW_AT_low_pc
- .4byte baz # DW_AT_location
+ .4byte .LFB0 /* DW_AT_low_pc */
+ .4byte baz /* DW_AT_location */
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [patch 1/2] testcase: Make it -m32 compatible [Re: [commit] Fix rereading of DWO DIEs]
2012-07-02 8:34 ` [patch 1/2] testcase: Make it -m32 compatible [Re: [commit] Fix rereading of DWO DIEs] Jan Kratochvil
@ 2012-07-02 8:38 ` Jan Kratochvil
2012-07-02 20:10 ` [commit] " Jan Kratochvil
1 sibling, 0 replies; 11+ messages in thread
From: Jan Kratochvil @ 2012-07-02 8:38 UTC (permalink / raw)
To: Doug Evans; +Cc: gdb-patches
On Mon, 02 Jul 2012 10:34:16 +0200, Jan Kratochvil wrote:
> As it is arch-independent testcase it does not need to limit itself to 64-bit
> targets.
I am aware it makes it incompatible AFAIK with (only?) Alpha which uses >4GB
addresses even for small binaries.
Regards,
Jan
^ permalink raw reply [flat|nested] 11+ messages in thread
* [commit] [patch 1/2] testcase: Make it -m32 compatible [Re: [commit] Fix rereading of DWO DIEs]
2012-07-02 8:34 ` [patch 1/2] testcase: Make it -m32 compatible [Re: [commit] Fix rereading of DWO DIEs] Jan Kratochvil
2012-07-02 8:38 ` Jan Kratochvil
@ 2012-07-02 20:10 ` Jan Kratochvil
1 sibling, 0 replies; 11+ messages in thread
From: Jan Kratochvil @ 2012-07-02 20:10 UTC (permalink / raw)
To: Doug Evans; +Cc: gdb-patches
On Mon, 02 Jul 2012 10:34:16 +0200, Jan Kratochvil wrote:
> I will check it in today. Verified it still FAILs without the fix.
[...]
> gdb/testsuite/
> 2012-07-02 Jan Kratochvil <jan.kratochvil@redhat.com>
>
> * gdb.dwarf2/fission-reread.S: Remove .section attributes.
> Change CU pointer size to 4 bytes, adjust .8byte to .4byte. Remove
> .note.GNU-stack.
Checked in:
http://sourceware.org/ml/gdb-cvs/2012-07/msg00017.html
Thanks,
Jan
^ permalink raw reply [flat|nested] 11+ messages in thread
* [commit] [patch 2/2] testcase: Make it cross-arch compatible [Re: [commit] Fix rereading of DWO DIEs]
2012-07-02 8:35 ` [patch 2/2] testcase: Make it cross-arch " Jan Kratochvil
@ 2012-07-02 20:11 ` Jan Kratochvil
0 siblings, 0 replies; 11+ messages in thread
From: Jan Kratochvil @ 2012-07-02 20:11 UTC (permalink / raw)
To: Doug Evans; +Cc: gdb-patches
On Mon, 02 Jul 2012 10:35:12 +0200, Jan Kratochvil wrote:
> I will check it in today. Verified it still FAILs without the fix.
[...]
> gdb/testsuite/
> 2012-07-02 Jan Kratochvil <jan.kratochvil@redhat.com>
>
> * gdb.dwarf2/fission-reread.S: Change # comments to /* */ comments.
Checked in:
http://sourceware.org/ml/gdb-cvs/2012-07/msg00018.html
Thanks,
Jan
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [commit] Fix rereading of DWO DIEs
2012-07-01 2:18 [commit] Fix rereading of DWO DIEs Doug Evans
2012-07-02 8:34 ` [patch 1/2] testcase: Make it -m32 compatible [Re: [commit] Fix rereading of DWO DIEs] Jan Kratochvil
2012-07-02 8:35 ` [patch 2/2] testcase: Make it cross-arch " Jan Kratochvil
@ 2012-07-19 8:12 ` Andreas Schwab
2012-07-19 16:17 ` dje
2 siblings, 1 reply; 11+ messages in thread
From: Andreas Schwab @ 2012-07-19 8:12 UTC (permalink / raw)
To: Doug Evans; +Cc: gdb-patches
dje@google.com (Doug Evans) writes:
> Index: testsuite/gdb.dwarf2/fission-reread.S
> ===================================================================
> RCS file: testsuite/gdb.dwarf2/fission-reread.S
> diff -N testsuite/gdb.dwarf2/fission-reread.S
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ testsuite/gdb.dwarf2/fission-reread.S 1 Jul 2012 01:52:47 -0000
> @@ -0,0 +1,459 @@
> +/* Copyright 2012 Free Software Foundation, Inc.
> +
> + This program is free software; you can redistribute it and/or modify
> + it under the terms of the GNU General Public License as published by
> + the Free Software Foundation; either version 3 of the License, or
> + (at your option) any later version.
> +
> + This program is distributed in the hope that it will be useful,
> + but WITHOUT ANY WARRANTY; without even the implied warranty of
> + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + GNU General Public License for more details.
> +
> + You should have received a copy of the GNU General Public License
> + along with this program. If not, see <http://www.gnu.org/licenses/>. */
> +
> +/* Testcase to exercise the code path in bug 13961 for Fission.
> + http://gcc.gnu.org/wiki/DebugFission
> +
> + Compiled from:
> +
> + class foo
> + {
> + public:
> + int bar;
> + };
> +
> + foo baz;
> +
> + int
> + main ()
> + {
> + return 0;
> + }
> +
> + And then manually edited to insert the necessary DW_AT_specification
> + entries to trigger the desired code path.
> + There's no real need to make this architecture-specific, so it has been
> + further hand-edited to support that.
> +*/
> +
> + .file "fission-reread.cc"
> +
> + .globl baz
> + .bss
Executing on host: gcc -c -o /home/abuild/rpmbuild/BUILD/gdb-7.4.91/gdb/testsuite/gdb.dwarf2/fission-reread0.o ./gdb.dwarf2/fission-reread.S (timeout = 300)
spawn gcc -c -o /home/abuild/rpmbuild/BUILD/gdb-7.4.91/gdb/testsuite/gdb.dwarf2/fission-reread0.o ./gdb.dwarf2/fission-reread.S
fission-reread.cc: Assembler messages:
fission-reread.cc:44: Error: unknown pseudo-op: `.bss'
compiler exited with status 1
output is:
fission-reread.cc: Assembler messages:
fission-reread.cc:44: Error: unknown pseudo-op: `.bss'
gdb compile failed, fission-reread.cc: Assembler messages:
fission-reread.cc:44: Error: unknown pseudo-op: `.bss'
UNTESTED: gdb.dwarf2/fission-reread.exp: fission-reread.exp
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [commit] Fix rereading of DWO DIEs
2012-07-19 8:12 ` [commit] Fix rereading of DWO DIEs Andreas Schwab
@ 2012-07-19 16:17 ` dje
2012-07-19 16:41 ` Andreas Schwab
0 siblings, 1 reply; 11+ messages in thread
From: dje @ 2012-07-19 16:17 UTC (permalink / raw)
To: Andreas Schwab; +Cc: gdb-patches
Andreas Schwab writes:
> Executing on host: gcc -c -o /home/abuild/rpmbuild/BUILD/gdb-7.4.91/gdb/testsuite/gdb.dwarf2/fission-reread0.o ./gdb.dwarf2/fission-reread.S (timeout = 300)
> spawn gcc -c -o /home/abuild/rpmbuild/BUILD/gdb-7.4.91/gdb/testsuite/gdb.dwarf2/fission-reread0.o ./gdb.dwarf2/fission-reread.S
> fission-reread.cc: Assembler messages:
> fission-reread.cc:44: Error: unknown pseudo-op: `.bss'
> compiler exited with status 1
> output is:
> fission-reread.cc: Assembler messages:
> fission-reread.cc:44: Error: unknown pseudo-op: `.bss'
>
> gdb compile failed, fission-reread.cc: Assembler messages:
> fission-reread.cc:44: Error: unknown pseudo-op: `.bss'
> UNTESTED: gdb.dwarf2/fission-reread.exp: fission-reread.exp
Hi.
Can you test this?
[.data is used elsewhere so this should be portable enough]
2012-07-19 Doug Evans <dje@google.com>
* gdb.dwarf2/fission-reread.S: Use .data instead of .bss.
* gdb.dwarf2/pr13961.S: Ditto.
Index: fission-reread.S
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/fission-reread.S,v
retrieving revision 1.4
diff -u -p -r1.4 fission-reread.S
--- fission-reread.S 15 Jul 2012 08:34:55 -0000 1.4
+++ fission-reread.S 19 Jul 2012 16:13:19 -0000
@@ -41,7 +41,7 @@
.file "fission-reread.cc"
.globl baz
- .bss
+ .data /* Previously this used .bss, but it's not portable. */
.align 4
.type baz, @object
.size baz, 4
Index: pr13961.S
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/pr13961.S,v
retrieving revision 1.2
diff -u -p -r1.2 pr13961.S
--- pr13961.S 3 May 2012 06:49:05 -0000 1.2
+++ pr13961.S 19 Jul 2012 16:13:19 -0000
@@ -40,7 +40,7 @@
.file "pr13961.cc"
.globl baz
- .bss
+ .data /* Previously this used .bss, but it's not portable. */
.align 4
.type baz, @object
.size baz, 4
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [commit] Fix rereading of DWO DIEs
2012-07-19 16:17 ` dje
@ 2012-07-19 16:41 ` Andreas Schwab
2012-07-19 17:24 ` Doug Evans
0 siblings, 1 reply; 11+ messages in thread
From: Andreas Schwab @ 2012-07-19 16:41 UTC (permalink / raw)
To: dje; +Cc: gdb-patches
dje@google.com writes:
> Andreas Schwab writes:
> > Executing on host: gcc -c -o /home/abuild/rpmbuild/BUILD/gdb-7.4.91/gdb/testsuite/gdb.dwarf2/fission-reread0.o ./gdb.dwarf2/fission-reread.S (timeout = 300)
> > spawn gcc -c -o /home/abuild/rpmbuild/BUILD/gdb-7.4.91/gdb/testsuite/gdb.dwarf2/fission-reread0.o ./gdb.dwarf2/fission-reread.S
> > fission-reread.cc: Assembler messages:
> > fission-reread.cc:44: Error: unknown pseudo-op: `.bss'
> > compiler exited with status 1
> > output is:
> > fission-reread.cc: Assembler messages:
> > fission-reread.cc:44: Error: unknown pseudo-op: `.bss'
> >
> > gdb compile failed, fission-reread.cc: Assembler messages:
> > fission-reread.cc:44: Error: unknown pseudo-op: `.bss'
> > UNTESTED: gdb.dwarf2/fission-reread.exp: fission-reread.exp
>
> Hi.
>
> Can you test this?
> [.data is used elsewhere so this should be portable enough]
Or .section .bss.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [commit] Fix rereading of DWO DIEs
2012-07-19 16:41 ` Andreas Schwab
@ 2012-07-19 17:24 ` Doug Evans
2012-07-30 16:58 ` Doug Evans
0 siblings, 1 reply; 11+ messages in thread
From: Doug Evans @ 2012-07-19 17:24 UTC (permalink / raw)
To: Andreas Schwab; +Cc: gdb-patches
On Thu, Jul 19, 2012 at 9:40 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> dje@google.com writes:
>
>> Andreas Schwab writes:
>> > Executing on host: gcc -c -o /home/abuild/rpmbuild/BUILD/gdb-7.4.91/gdb/testsuite/gdb.dwarf2/fission-reread0.o ./gdb.dwarf2/fission-reread.S (timeout = 300)
>> > spawn gcc -c -o /home/abuild/rpmbuild/BUILD/gdb-7.4.91/gdb/testsuite/gdb.dwarf2/fission-reread0.o ./gdb.dwarf2/fission-reread.S
>> > fission-reread.cc: Assembler messages:
>> > fission-reread.cc:44: Error: unknown pseudo-op: `.bss'
>> > compiler exited with status 1
>> > output is:
>> > fission-reread.cc: Assembler messages:
>> > fission-reread.cc:44: Error: unknown pseudo-op: `.bss'
>> >
>> > gdb compile failed, fission-reread.cc: Assembler messages:
>> > fission-reread.cc:44: Error: unknown pseudo-op: `.bss'
>> > UNTESTED: gdb.dwarf2/fission-reread.exp: fission-reread.exp
>>
>> Hi.
>>
>> Can you test this?
>> [.data is used elsewhere so this should be portable enough]
>
> Or .section .bss.
There is no occurrence of the word "bss" in any gdb.dwarf2/*.S files
outside the two files in question, so for consistency's sake I went
with .data.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [commit] Fix rereading of DWO DIEs
2012-07-19 17:24 ` Doug Evans
@ 2012-07-30 16:58 ` Doug Evans
0 siblings, 0 replies; 11+ messages in thread
From: Doug Evans @ 2012-07-30 16:58 UTC (permalink / raw)
To: Andreas Schwab; +Cc: gdb-patches
On Thu, Jul 19, 2012 at 10:24 AM, Doug Evans <dje@google.com> wrote:
> On Thu, Jul 19, 2012 at 9:40 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
>> dje@google.com writes:
>>
>>> Andreas Schwab writes:
>>> > Executing on host: gcc -c -o /home/abuild/rpmbuild/BUILD/gdb-7.4.91/gdb/testsuite/gdb.dwarf2/fission-reread0.o ./gdb.dwarf2/fission-reread.S (timeout = 300)
>>> > spawn gcc -c -o /home/abuild/rpmbuild/BUILD/gdb-7.4.91/gdb/testsuite/gdb.dwarf2/fission-reread0.o ./gdb.dwarf2/fission-reread.S
>>> > fission-reread.cc: Assembler messages:
>>> > fission-reread.cc:44: Error: unknown pseudo-op: `.bss'
>>> > compiler exited with status 1
>>> > output is:
>>> > fission-reread.cc: Assembler messages:
>>> > fission-reread.cc:44: Error: unknown pseudo-op: `.bss'
>>> >
>>> > gdb compile failed, fission-reread.cc: Assembler messages:
>>> > fission-reread.cc:44: Error: unknown pseudo-op: `.bss'
>>> > UNTESTED: gdb.dwarf2/fission-reread.exp: fission-reread.exp
>>>
>>> Hi.
>>>
>>> Can you test this?
>>> [.data is used elsewhere so this should be portable enough]
>>
>> Or .section .bss.
>
> There is no occurrence of the word "bss" in any gdb.dwarf2/*.S files
> outside the two files in question, so for consistency's sake I went
> with .data.
Committed to cvs head and 7.5 branch.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2012-07-30 16:58 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-01 2:18 [commit] Fix rereading of DWO DIEs Doug Evans
2012-07-02 8:34 ` [patch 1/2] testcase: Make it -m32 compatible [Re: [commit] Fix rereading of DWO DIEs] Jan Kratochvil
2012-07-02 8:38 ` Jan Kratochvil
2012-07-02 20:10 ` [commit] " Jan Kratochvil
2012-07-02 8:35 ` [patch 2/2] testcase: Make it cross-arch " Jan Kratochvil
2012-07-02 20:11 ` [commit] " Jan Kratochvil
2012-07-19 8:12 ` [commit] Fix rereading of DWO DIEs Andreas Schwab
2012-07-19 16:17 ` dje
2012-07-19 16:41 ` Andreas Schwab
2012-07-19 17:24 ` Doug Evans
2012-07-30 16:58 ` Doug Evans
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox