forked from Imagelibrary/binutils-gdb
* symfile.c (INLINE_ADD_PSYMBOL): Remove ifdef.
(add_psymbol_to_list): Add an arg for passing CORE_ADDR values and use it, rather than calling add_psymbol_addr_to_list. (add_psymbol_addr_to_list): Delete. (add_psymbol_to_list): Make psymbol static to avoid random data in gaps due to alignment of structure members. * symfile.h (INLINE_ADD_PSYMBOL, ADD_PSYMBOL_TO_LIST, ADD_PSYMBOL_ADDR_TO_LIST): Remove. Real world tests show no performance improvements by inlining via complicated macros and they just make gdb larger and harder to maintain. * dwarfread.c (add_enum_psymbol): Replace ADD_PSYMBOL_TO_LIST and/or ADD_PSYMBOL_ADDR_TO_LIST macro(s) with call to add_psymbol_to_list with appropriate long or CORE_ADDR args. (add_partial_symbol): Ditto. * partial-stab.h: Ditto. * os9kread.c (read_os9k_psymtab): Ditto * mdebugread.c (parse_partial_symbols): Ditto. (handle_psymbol_enumerators): Ditto. (demangle.h): Include. * hpread.c (hpread_build_psymtabs): Ditto. (hpread_build_psymtabs): Ditto. (demangle.h): Include
This commit is contained in:
@@ -49,6 +49,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
#include "buildsym.h"
|
||||
#include "stabsread.h"
|
||||
#include "complaints.h"
|
||||
#include "demangle.h"
|
||||
|
||||
/* These are needed if the tm.h file does not contain the necessary
|
||||
mips specific definitions. */
|
||||
@@ -2696,15 +2697,15 @@ parse_partial_symbols (objfile, section_offsets)
|
||||
symbol table, and the MAIN__ symbol via the minimal
|
||||
symbol table. */
|
||||
if (sh.st == stProc)
|
||||
ADD_PSYMBOL_TO_LIST (name, strlen (name),
|
||||
add_psymbol_to_list (name, strlen (name),
|
||||
VAR_NAMESPACE, LOC_BLOCK,
|
||||
objfile->global_psymbols,
|
||||
sh.value, psymtab_language, objfile);
|
||||
&objfile->global_psymbols,
|
||||
sh.value, 0, psymtab_language, objfile);
|
||||
else
|
||||
ADD_PSYMBOL_TO_LIST (name, strlen (name),
|
||||
add_psymbol_to_list (name, strlen (name),
|
||||
VAR_NAMESPACE, LOC_BLOCK,
|
||||
objfile->static_psymbols,
|
||||
sh.value, psymtab_language, objfile);
|
||||
&objfile->static_psymbols,
|
||||
sh.value, 0, psymtab_language, objfile);
|
||||
|
||||
/* Skip over procedure to next one. */
|
||||
if (sh.index >= hdr->iauxMax)
|
||||
@@ -2792,10 +2793,10 @@ parse_partial_symbols (objfile, section_offsets)
|
||||
&& sh.iss != 0
|
||||
&& sh.index != cur_sdx + 2)
|
||||
{
|
||||
ADD_PSYMBOL_TO_LIST (name, strlen (name),
|
||||
add_psymbol_to_list (name, strlen (name),
|
||||
STRUCT_NAMESPACE, LOC_TYPEDEF,
|
||||
objfile->static_psymbols,
|
||||
sh.value,
|
||||
&objfile->static_psymbols,
|
||||
sh.value, 0,
|
||||
psymtab_language, objfile);
|
||||
}
|
||||
handle_psymbol_enumerators (objfile, fh, sh.st, sh.value);
|
||||
@@ -2831,10 +2832,10 @@ parse_partial_symbols (objfile, section_offsets)
|
||||
continue;
|
||||
}
|
||||
/* Use this gdb symbol */
|
||||
ADD_PSYMBOL_TO_LIST (name, strlen (name),
|
||||
add_psymbol_to_list (name, strlen (name),
|
||||
VAR_NAMESPACE, class,
|
||||
objfile->static_psymbols, sh.value,
|
||||
psymtab_language, objfile);
|
||||
&objfile->static_psymbols, sh.value,
|
||||
0, psymtab_language, objfile);
|
||||
skip:
|
||||
cur_sdx++; /* Go to next file symbol */
|
||||
}
|
||||
@@ -2907,11 +2908,11 @@ parse_partial_symbols (objfile, section_offsets)
|
||||
break;
|
||||
}
|
||||
name = debug_info->ssext + psh->iss;
|
||||
ADD_PSYMBOL_ADDR_TO_LIST (name, strlen (name),
|
||||
VAR_NAMESPACE, class,
|
||||
objfile->global_psymbols,
|
||||
svalue,
|
||||
psymtab_language, objfile);
|
||||
add_psymbol_to_list (name, strlen (name),
|
||||
VAR_NAMESPACE, class,
|
||||
&objfile->global_psymbols,
|
||||
0, svalue,
|
||||
psymtab_language, objfile);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3076,10 +3077,10 @@ handle_psymbol_enumerators (objfile, fh, stype, svalue)
|
||||
|
||||
/* Note that the value doesn't matter for enum constants
|
||||
in psymtabs, just in symtabs. */
|
||||
ADD_PSYMBOL_TO_LIST (name, strlen (name),
|
||||
add_psymbol_to_list (name, strlen (name),
|
||||
VAR_NAMESPACE, LOC_CONST,
|
||||
objfile->static_psymbols, 0,
|
||||
psymtab_language, objfile);
|
||||
&objfile->static_psymbols, 0,
|
||||
0, psymtab_language, objfile);
|
||||
ext_sym += external_sym_size;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user