aboutsummaryrefslogtreecommitdiff
path: root/gdb/xcoffread.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/xcoffread.c')
-rw-r--r--gdb/xcoffread.c107
1 files changed, 53 insertions, 54 deletions
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index 389678a..3588aae 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -2035,8 +2035,7 @@ xcoff_end_psymtab (struct objfile *objfile, legacy_psymtab *pst,
if (num_includes == 0
&& number_dependencies == 0
- && pst->n_global_syms == 0
- && pst->n_static_syms == 0)
+ && pst->empty ())
{
/* Throw away this psymtab, it's empty. */
/* Empty psymtabs happen as a result of header files which don't have
@@ -2575,25 +2574,25 @@ scan_xcoff_symtab (minimal_symbol_reader &reader,
switch (p[1])
{
case 'S':
- add_psymbol_to_list (gdb::string_view (namestring,
- p - namestring),
- true, VAR_DOMAIN, LOC_STATIC,
- SECT_OFF_DATA (objfile),
- psymbol_placement::STATIC,
- symbol.n_value,
- psymtab_language, objfile);
+ pst->add_psymbol (gdb::string_view (namestring,
+ p - namestring),
+ true, VAR_DOMAIN, LOC_STATIC,
+ SECT_OFF_DATA (objfile),
+ psymbol_placement::STATIC,
+ symbol.n_value,
+ psymtab_language, objfile);
continue;
case 'G':
/* The addresses in these entries are reported to be
wrong. See the code that reads 'G's for symtabs. */
- add_psymbol_to_list (gdb::string_view (namestring,
- p - namestring),
- true, VAR_DOMAIN, LOC_STATIC,
- SECT_OFF_DATA (objfile),
- psymbol_placement::GLOBAL,
- symbol.n_value,
- psymtab_language, objfile);
+ pst->add_psymbol (gdb::string_view (namestring,
+ p - namestring),
+ true, VAR_DOMAIN, LOC_STATIC,
+ SECT_OFF_DATA (objfile),
+ psymbol_placement::GLOBAL,
+ symbol.n_value,
+ psymtab_language, objfile);
continue;
case 'T':
@@ -2607,19 +2606,19 @@ scan_xcoff_symtab (minimal_symbol_reader &reader,
|| (p == namestring + 1
&& namestring[0] != ' '))
{
- add_psymbol_to_list (gdb::string_view (namestring,
- p - namestring),
- true, STRUCT_DOMAIN, LOC_TYPEDEF, -1,
- psymbol_placement::STATIC,
- 0, psymtab_language, objfile);
+ pst->add_psymbol (gdb::string_view (namestring,
+ p - namestring),
+ true, STRUCT_DOMAIN, LOC_TYPEDEF, -1,
+ psymbol_placement::STATIC,
+ 0, psymtab_language, objfile);
if (p[2] == 't')
{
/* Also a typedef with the same name. */
- add_psymbol_to_list (gdb::string_view (namestring,
- p - namestring),
- true, VAR_DOMAIN, LOC_TYPEDEF, -1,
- psymbol_placement::STATIC,
- 0, psymtab_language, objfile);
+ pst->add_psymbol (gdb::string_view (namestring,
+ p - namestring),
+ true, VAR_DOMAIN, LOC_TYPEDEF, -1,
+ psymbol_placement::STATIC,
+ 0, psymtab_language, objfile);
p += 1;
}
}
@@ -2628,11 +2627,11 @@ scan_xcoff_symtab (minimal_symbol_reader &reader,
case 't':
if (p != namestring) /* a name is there, not just :T... */
{
- add_psymbol_to_list (gdb::string_view (namestring,
- p - namestring),
- true, VAR_DOMAIN, LOC_TYPEDEF, -1,
- psymbol_placement::STATIC,
- 0, psymtab_language, objfile);
+ pst->add_psymbol (gdb::string_view (namestring,
+ p - namestring),
+ true, VAR_DOMAIN, LOC_TYPEDEF, -1,
+ psymbol_placement::STATIC,
+ 0, psymtab_language, objfile);
}
check_enum:
/* If this is an enumerated type, we need to
@@ -2691,10 +2690,10 @@ scan_xcoff_symtab (minimal_symbol_reader &reader,
;
/* Note that the value doesn't matter for
enum constants in psymtabs, just in symtabs. */
- add_psymbol_to_list (gdb::string_view (p, q - p), true,
- VAR_DOMAIN, LOC_CONST, -1,
- psymbol_placement::STATIC,
- 0, psymtab_language, objfile);
+ pst->add_psymbol (gdb::string_view (p, q - p), true,
+ VAR_DOMAIN, LOC_CONST, -1,
+ psymbol_placement::STATIC,
+ 0, psymtab_language, objfile);
/* Point past the name. */
p = q;
/* Skip over the value. */
@@ -2709,11 +2708,11 @@ scan_xcoff_symtab (minimal_symbol_reader &reader,
case 'c':
/* Constant, e.g. from "const" in Pascal. */
- add_psymbol_to_list (gdb::string_view (namestring,
- p - namestring),
- true, VAR_DOMAIN, LOC_CONST, -1,
- psymbol_placement::STATIC,
- 0, psymtab_language, objfile);
+ pst->add_psymbol (gdb::string_view (namestring,
+ p - namestring),
+ true, VAR_DOMAIN, LOC_CONST, -1,
+ psymbol_placement::STATIC,
+ 0, psymtab_language, objfile);
continue;
case 'f':
@@ -2727,13 +2726,13 @@ scan_xcoff_symtab (minimal_symbol_reader &reader,
function_outside_compilation_unit_complaint (name);
xfree (name);
}
- add_psymbol_to_list (gdb::string_view (namestring,
- p - namestring),
- true, VAR_DOMAIN, LOC_BLOCK,
- SECT_OFF_TEXT (objfile),
- psymbol_placement::STATIC,
- symbol.n_value,
- psymtab_language, objfile);
+ pst->add_psymbol (gdb::string_view (namestring,
+ p - namestring),
+ true, VAR_DOMAIN, LOC_BLOCK,
+ SECT_OFF_TEXT (objfile),
+ psymbol_placement::STATIC,
+ symbol.n_value,
+ psymtab_language, objfile);
continue;
/* Global functions were ignored here, but now they
@@ -2758,13 +2757,13 @@ scan_xcoff_symtab (minimal_symbol_reader &reader,
if (startswith (namestring, "@FIX"))
continue;
- add_psymbol_to_list (gdb::string_view (namestring,
- p - namestring),
- true, VAR_DOMAIN, LOC_BLOCK,
- SECT_OFF_TEXT (objfile),
- psymbol_placement::GLOBAL,
- symbol.n_value,
- psymtab_language, objfile);
+ pst->add_psymbol (gdb::string_view (namestring,
+ p - namestring),
+ true, VAR_DOMAIN, LOC_BLOCK,
+ SECT_OFF_TEXT (objfile),
+ psymbol_placement::GLOBAL,
+ symbol.n_value,
+ psymtab_language, objfile);
continue;
/* Two things show up here (hopefully); static symbols of