mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 06:45:56 +08:00
gdb/
* psymtab.c (lookup_symbol_aux_psymtabs): New variable stab_best. Use it as a fallback for TYPE_IS_OPAQUE. * symfile.h (struct quick_symbol_functions): Mention TYPE_OPAQUE symbols for lookup_symbol. gdb/testsuite/ * gdb.dwarf2/dw2-icc-opaque.S: Add debug_info_seg3 and .debug_abbrev_seg3.
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
2012-05-24 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
|
* psymtab.c (lookup_symbol_aux_psymtabs): New variable stab_best. Use
|
||||||
|
it as a fallback for TYPE_IS_OPAQUE.
|
||||||
|
* symfile.h (struct quick_symbol_functions): Mention TYPE_OPAQUE
|
||||||
|
symbols for lookup_symbol.
|
||||||
|
|
||||||
2012-05-24 John Steele Scott <toojays@toojays.net>
|
2012-05-24 John Steele Scott <toojays@toojays.net>
|
||||||
|
|
||||||
PR symtab/13277: Resolving opaque structures in ICC generated binaries.
|
PR symtab/13277: Resolving opaque structures in ICC generated binaries.
|
||||||
|
@ -510,6 +510,7 @@ lookup_symbol_aux_psymtabs (struct objfile *objfile,
|
|||||||
{
|
{
|
||||||
struct partial_symtab *ps;
|
struct partial_symtab *ps;
|
||||||
const int psymtab_index = (block_index == GLOBAL_BLOCK ? 1 : 0);
|
const int psymtab_index = (block_index == GLOBAL_BLOCK ? 1 : 0);
|
||||||
|
struct symtab *stab_best = NULL;
|
||||||
|
|
||||||
ALL_OBJFILE_PSYMTABS_REQUIRED (objfile, ps)
|
ALL_OBJFILE_PSYMTABS_REQUIRED (objfile, ps)
|
||||||
{
|
{
|
||||||
@ -530,13 +531,18 @@ lookup_symbol_aux_psymtabs (struct objfile *objfile,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (sym && strcmp_iw (SYMBOL_SEARCH_NAME (sym), name) == 0)
|
if (sym && strcmp_iw (SYMBOL_SEARCH_NAME (sym), name) == 0)
|
||||||
return stab;
|
{
|
||||||
|
if (!TYPE_IS_OPAQUE (SYMBOL_TYPE (sym)))
|
||||||
|
return stab;
|
||||||
|
|
||||||
|
stab_best = stab;
|
||||||
|
}
|
||||||
|
|
||||||
/* Keep looking through other psymtabs. */
|
/* Keep looking through other psymtabs. */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return stab_best;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Look in PST for a symbol in DOMAIN whose name matches NAME. Search
|
/* Look in PST for a symbol in DOMAIN whose name matches NAME. Search
|
||||||
|
@ -182,7 +182,9 @@ struct quick_symbol_functions
|
|||||||
indicates what sort of symbol to search for.
|
indicates what sort of symbol to search for.
|
||||||
|
|
||||||
Returns the newly-expanded symbol table in which the symbol is
|
Returns the newly-expanded symbol table in which the symbol is
|
||||||
defined, or NULL if no such symbol table exists. */
|
defined, or NULL if no such symbol table exists. If OBJFILE
|
||||||
|
contains !TYPE_OPAQUE symbol prefer its symtab. If it contains
|
||||||
|
only TYPE_OPAQUE symbol(s), return at least that symtab. */
|
||||||
struct symtab *(*lookup_symbol) (struct objfile *objfile,
|
struct symtab *(*lookup_symbol) (struct objfile *objfile,
|
||||||
int kind, const char *name,
|
int kind, const char *name,
|
||||||
domain_enum domain);
|
domain_enum domain);
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2012-05-24 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
|
* gdb.dwarf2/dw2-icc-opaque.S: Add debug_info_seg3 and
|
||||||
|
.debug_abbrev_seg3.
|
||||||
|
|
||||||
2012-05-24 John Steele Scott <toojays@toojays.net>
|
2012-05-24 John Steele Scott <toojays@toojays.net>
|
||||||
|
|
||||||
PR symtab/13277: Resolving opaque structures in ICC generated binaries.
|
PR symtab/13277: Resolving opaque structures in ICC generated binaries.
|
||||||
|
@ -205,3 +205,54 @@ debug_info_seg2_end:
|
|||||||
.byte 0x08 /* DW_FORM_string. */
|
.byte 0x08 /* DW_FORM_string. */
|
||||||
.2byte 0x0000 /* End abbrev. */
|
.2byte 0x0000 /* End abbrev. */
|
||||||
.byte 0x00 /* End abbrev table. */
|
.byte 0x00 /* End abbrev table. */
|
||||||
|
|
||||||
|
|
||||||
|
.file "opaque-pointer2.c"
|
||||||
|
|
||||||
|
.section .debug_info
|
||||||
|
.align 1
|
||||||
|
debug_info_seg3:
|
||||||
|
.4byte debug_info_seg3_end - 1f /* Length of compilation unit info. */
|
||||||
|
1:
|
||||||
|
.2byte 0x0002 /* DWARF version number. */
|
||||||
|
.4byte .debug_abbrev_seg3 /* Points to abbrev section for this unit. */
|
||||||
|
.byte 0x04 /* Target address size. */
|
||||||
|
|
||||||
|
.byte 0x01 /* DIE 1: DW_TAG_compile_unit. */
|
||||||
|
.byte 0x01 /* DW_AT_language = DW_LANG_C89. */
|
||||||
|
.ascii "Intel(R) C Intel(R) 64 Compiler XE " /* DW_AT_producer. */
|
||||||
|
.ascii "for applications running on Intel(R) 64, "
|
||||||
|
.ascii "Version 12.0.4.191 Build 20110427\n "
|
||||||
|
.asciz "Fixes SameLinkageName MemberPointers"
|
||||||
|
|
||||||
|
.byte 0x04 /* DIE 4: DW_TAG_structure_type. */
|
||||||
|
.byte 0x01 /* DW_AT_accessibility. */
|
||||||
|
.byte 0x00 /* DW_AT_byte_size. */
|
||||||
|
.asciz "opaque_struct_t" /* DW_AT_name. */
|
||||||
|
|
||||||
|
.byte 0x00 /* End DIE 1. */
|
||||||
|
debug_info_seg3_end:
|
||||||
|
|
||||||
|
.section .debug_abbrev
|
||||||
|
.debug_abbrev_seg3:
|
||||||
|
.align 1
|
||||||
|
.byte 0x01 /* Abbrev 1. */
|
||||||
|
.byte 0x11 /* DW_TAG_compile_unit. */
|
||||||
|
.byte 0x01 /* DW_CHILDREN_yes. */
|
||||||
|
.byte 0x13 /* DW_AT_language. */
|
||||||
|
.byte 0x0b /* DW_FORM_data1. */
|
||||||
|
.byte 0x25 /* DW_AT_producer. */
|
||||||
|
.byte 0x08 /* DW_AT_string. */
|
||||||
|
.2byte 0x0000 /* End abbrev. */
|
||||||
|
|
||||||
|
.byte 0x04 /* Abbrev 4. */
|
||||||
|
.byte 0x13 /* DW_TAG_structure_type. */
|
||||||
|
.byte 0x00 /* DW_CHILDREN_no. */
|
||||||
|
.byte 0x32 /* DW_AT_accessibility. */
|
||||||
|
.byte 0x0b /* DW_FORM_data1. */
|
||||||
|
.byte 0x0b /* DW_AT_byte_size. */
|
||||||
|
.byte 0x0b /* DW_FORM_data1. */
|
||||||
|
.byte 0x03 /* DW_AT_name. */
|
||||||
|
.byte 0x08 /* DW_FORM_string. */
|
||||||
|
.2byte 0x0000 /* End abbrev. */
|
||||||
|
.byte 0x00 /* End abbrev table. */
|
||||||
|
Reference in New Issue
Block a user