aboutsummaryrefslogtreecommitdiff
path: root/gdb/mdebugread.c
diff options
context:
space:
mode:
authorFred Fish <fnf@specifix.com>1996-04-06 10:19:19 +0000
committerFred Fish <fnf@specifix.com>1996-04-06 10:19:19 +0000
commiteae8aa302e9a76565bca1cf381e76125e1d9ff89 (patch)
treef9011ec07116881c3b35017a75e521143c2af693 /gdb/mdebugread.c
parente24146ec9529e0c028962910ac2efba45e42b9cf (diff)
downloadgdb-eae8aa302e9a76565bca1cf381e76125e1d9ff89.zip
gdb-eae8aa302e9a76565bca1cf381e76125e1d9ff89.tar.gz
gdb-eae8aa302e9a76565bca1cf381e76125e1d9ff89.tar.bz2
* 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
Diffstat (limited to 'gdb/mdebugread.c')
-rw-r--r--gdb/mdebugread.c41
1 files changed, 21 insertions, 20 deletions
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c
index 96c59f8..3fe4f96 100644
--- a/gdb/mdebugread.c
+++ b/gdb/mdebugread.c
@@ -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;
}
}