aboutsummaryrefslogtreecommitdiff
path: root/gdb/mdebugread.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-05-10 16:23:46 -0600
committerTom Tromey <tom@tromey.com>2019-01-10 07:08:11 -0700
commit75aedd27e6a2c58734ab44cc7cad8491f19d059a (patch)
tree6208568d9314888fffc6755303e953fa4064090a /gdb/mdebugread.c
parent939652a515a10654b16b97e7e2ea39c013714850 (diff)
downloadgdb-75aedd27e6a2c58734ab44cc7cad8491f19d059a.zip
gdb-75aedd27e6a2c58734ab44cc7cad8491f19d059a.tar.gz
gdb-75aedd27e6a2c58734ab44cc7cad8491f19d059a.tar.bz2
Change add_psymbol_to_list to use an enum
This changes add_psymbol_to_list to use an enum, rather than a pointer to a vector, to decide where to put the new symbol. This reduces the number of direct references to the static_psymbols and global_psymbols members of the objfile, which is handy in a later patch. gdb/ChangeLog 2019-01-10 Tom Tromey <tom@tromey.com> * xcoffread.c (scan_xcoff_symtab): Update. * psymtab.c (add_psymbol_to_list): Replace "list" parameter with "where". * mdebugread.c (parse_partial_symbols) (handle_psymbol_enumerators): Update. * dwarf2read.c (add_partial_symbol, load_partial_dies): Update. * dbxread.c (read_dbx_symtab): Update. * psympriv.h (psymbol_placement): New enum. (add_psymbol_to_list): Update.
Diffstat (limited to 'gdb/mdebugread.c')
-rw-r--r--gdb/mdebugread.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c
index 766a6d1..6cf2cad 100644
--- a/gdb/mdebugread.c
+++ b/gdb/mdebugread.c
@@ -3048,7 +3048,7 @@ parse_partial_symbols (minimal_symbol_reader &reader,
add_psymbol_to_list (namestring, p - namestring, 1,
VAR_DOMAIN, LOC_STATIC,
SECT_OFF_DATA (objfile),
- &objfile->static_psymbols,
+ psymbol_placement::STATIC,
sh.value,
psymtab_language, objfile);
continue;
@@ -3059,7 +3059,7 @@ parse_partial_symbols (minimal_symbol_reader &reader,
add_psymbol_to_list (namestring, p - namestring, 1,
VAR_DOMAIN, LOC_STATIC,
SECT_OFF_DATA (objfile),
- &objfile->global_psymbols,
+ psymbol_placement::GLOBAL,
sh.value,
psymtab_language, objfile);
continue;
@@ -3078,7 +3078,7 @@ parse_partial_symbols (minimal_symbol_reader &reader,
add_psymbol_to_list (namestring, p - namestring, 1,
STRUCT_DOMAIN, LOC_TYPEDEF,
-1,
- &objfile->static_psymbols,
+ psymbol_placement::STATIC,
0, psymtab_language, objfile);
if (p[2] == 't')
{
@@ -3087,7 +3087,7 @@ parse_partial_symbols (minimal_symbol_reader &reader,
p - namestring, 1,
VAR_DOMAIN, LOC_TYPEDEF,
-1,
- &objfile->static_psymbols,
+ psymbol_placement::STATIC,
0, psymtab_language,
objfile);
p += 1;
@@ -3101,7 +3101,7 @@ parse_partial_symbols (minimal_symbol_reader &reader,
add_psymbol_to_list (namestring, p - namestring, 1,
VAR_DOMAIN, LOC_TYPEDEF,
-1,
- &objfile->static_psymbols,
+ psymbol_placement::STATIC,
0, psymtab_language, objfile);
}
check_enum:
@@ -3166,7 +3166,7 @@ parse_partial_symbols (minimal_symbol_reader &reader,
add_psymbol_to_list (p, q - p, 1,
VAR_DOMAIN, LOC_CONST,
-1,
- &objfile->static_psymbols,
+ psymbol_placement::STATIC,
0, psymtab_language,
objfile);
/* Point past the name. */
@@ -3184,7 +3184,7 @@ parse_partial_symbols (minimal_symbol_reader &reader,
/* Constant, e.g. from "const" in Pascal. */
add_psymbol_to_list (namestring, p - namestring, 1,
VAR_DOMAIN, LOC_CONST, -1,
- &objfile->static_psymbols,
+ psymbol_placement::STATIC,
0, psymtab_language, objfile);
continue;
@@ -3198,7 +3198,7 @@ parse_partial_symbols (minimal_symbol_reader &reader,
add_psymbol_to_list (namestring, p - namestring, 1,
VAR_DOMAIN, LOC_BLOCK,
SECT_OFF_TEXT (objfile),
- &objfile->static_psymbols,
+ psymbol_placement::STATIC,
sh.value,
psymtab_language, objfile);
continue;
@@ -3217,7 +3217,7 @@ parse_partial_symbols (minimal_symbol_reader &reader,
add_psymbol_to_list (namestring, p - namestring, 1,
VAR_DOMAIN, LOC_BLOCK,
SECT_OFF_TEXT (objfile),
- &objfile->global_psymbols,
+ psymbol_placement::GLOBAL,
sh.value,
psymtab_language, objfile);
continue;
@@ -3455,13 +3455,13 @@ parse_partial_symbols (minimal_symbol_reader &reader,
add_psymbol_to_list (sym_name, strlen (sym_name), 1,
VAR_DOMAIN, LOC_BLOCK,
section,
- &objfile->global_psymbols,
+ psymbol_placement::GLOBAL,
sh.value, psymtab_language, objfile);
else
add_psymbol_to_list (sym_name, strlen (sym_name), 1,
VAR_DOMAIN, LOC_BLOCK,
section,
- &objfile->static_psymbols,
+ psymbol_placement::STATIC,
sh.value, psymtab_language, objfile);
procaddr = sh.value;
@@ -3527,7 +3527,7 @@ parse_partial_symbols (minimal_symbol_reader &reader,
{
add_psymbol_to_list (sym_name, strlen (sym_name), 1,
STRUCT_DOMAIN, LOC_TYPEDEF, -1,
- &objfile->static_psymbols,
+ psymbol_placement::STATIC,
0, psymtab_language, objfile);
}
handle_psymbol_enumerators (objfile, fh, sh.st, sh.value);
@@ -3567,7 +3567,7 @@ parse_partial_symbols (minimal_symbol_reader &reader,
/* Use this gdb symbol. */
add_psymbol_to_list (sym_name, strlen (sym_name), 1,
VAR_DOMAIN, theclass, section,
- &objfile->static_psymbols,
+ psymbol_placement::STATIC,
sh.value, psymtab_language, objfile);
skip:
cur_sdx++; /* Go to next file symbol. */
@@ -3647,7 +3647,7 @@ parse_partial_symbols (minimal_symbol_reader &reader,
add_psymbol_to_list (sym_name, strlen (sym_name), 1,
VAR_DOMAIN, theclass,
section,
- &objfile->global_psymbols,
+ psymbol_placement::GLOBAL,
svalue, psymtab_language, objfile);
}
}
@@ -3808,7 +3808,7 @@ handle_psymbol_enumerators (struct objfile *objfile, FDR *fh, int stype,
in psymtabs, just in symtabs. */
add_psymbol_to_list (name, strlen (name), 1,
VAR_DOMAIN, LOC_CONST, -1,
- &objfile->static_psymbols, 0,
+ psymbol_placement::STATIC, 0,
psymtab_language, objfile);
ext_sym += external_sym_size;
}