* dwarf2read.c (dwarf_decode_macro_bytes)
<DW_MACRO_GNU_transparent_include>: Use pointer to included data as hash key.
This commit is contained in:
parent
b1759dce03
commit
a036ba48ef
|
@ -1,3 +1,9 @@
|
|||
2012-08-15 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* dwarf2read.c (dwarf_decode_macro_bytes)
|
||||
<DW_MACRO_GNU_transparent_include>: Use pointer to included data
|
||||
as hash key.
|
||||
|
||||
2012-08-14 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* infcmd.c (_initialize_infcmd): Update help text for the signal,
|
||||
|
|
|
@ -17658,28 +17658,15 @@ dwarf_decode_macro_bytes (bfd *abfd, gdb_byte *mac_ptr, gdb_byte *mac_end,
|
|||
{
|
||||
LONGEST offset;
|
||||
void **slot;
|
||||
|
||||
offset = read_offset_1 (abfd, mac_ptr, offset_size);
|
||||
mac_ptr += offset_size;
|
||||
|
||||
slot = htab_find_slot (include_hash, mac_ptr, INSERT);
|
||||
if (*slot != NULL)
|
||||
{
|
||||
/* This has actually happened; see
|
||||
http://sourceware.org/bugzilla/show_bug.cgi?id=13568. */
|
||||
complaint (&symfile_complaints,
|
||||
_("recursive DW_MACRO_GNU_transparent_include in "
|
||||
".debug_macro section"));
|
||||
}
|
||||
else
|
||||
{
|
||||
bfd *include_bfd = abfd;
|
||||
struct dwarf2_section_info *include_section = section;
|
||||
struct dwarf2_section_info alt_section;
|
||||
gdb_byte *include_mac_end = mac_end;
|
||||
int is_dwz = section_is_dwz;
|
||||
gdb_byte *new_mac_ptr;
|
||||
|
||||
*slot = mac_ptr;
|
||||
offset = read_offset_1 (abfd, mac_ptr, offset_size);
|
||||
mac_ptr += offset_size;
|
||||
|
||||
if (macinfo_type == DW_MACRO_GNU_transparent_include_alt)
|
||||
{
|
||||
|
@ -17694,14 +17681,28 @@ dwarf_decode_macro_bytes (bfd *abfd, gdb_byte *mac_ptr, gdb_byte *mac_end,
|
|||
is_dwz = 1;
|
||||
}
|
||||
|
||||
dwarf_decode_macro_bytes (include_bfd,
|
||||
include_section->buffer + offset,
|
||||
new_mac_ptr = include_section->buffer + offset;
|
||||
slot = htab_find_slot (include_hash, new_mac_ptr, INSERT);
|
||||
|
||||
if (*slot != NULL)
|
||||
{
|
||||
/* This has actually happened; see
|
||||
http://sourceware.org/bugzilla/show_bug.cgi?id=13568. */
|
||||
complaint (&symfile_complaints,
|
||||
_("recursive DW_MACRO_GNU_transparent_include in "
|
||||
".debug_macro section"));
|
||||
}
|
||||
else
|
||||
{
|
||||
*slot = new_mac_ptr;
|
||||
|
||||
dwarf_decode_macro_bytes (include_bfd, new_mac_ptr,
|
||||
include_mac_end, current_file,
|
||||
lh, comp_dir,
|
||||
section, section_is_gnu, is_dwz,
|
||||
offset_size, objfile, include_hash);
|
||||
|
||||
htab_remove_elt (include_hash, mac_ptr);
|
||||
htab_remove_elt (include_hash, new_mac_ptr);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue