+2015-08-15 Doug Evans <xdje42@gmail.com>
+
+ * psymtab.c (add_psymbol_to_bcache): Remove "val" arg. All callers
+ updated.
+ (add_psymbol_to_list): Ditto.
+
2015-08-15 Doug Evans <xdje42@gmail.com>
* dbxread.c (dbx_end_psymtab): Renamed from end_psymtab. All callers
add_psymbol_to_list (sym_name, sym_len, 1,
VAR_DOMAIN, LOC_STATIC,
&objfile->static_psymbols,
- 0, nlist.n_value,
- psymtab_language, objfile);
+ nlist.n_value, psymtab_language, objfile);
continue;
case 'G':
add_psymbol_to_list (sym_name, sym_len, 1,
VAR_DOMAIN, LOC_STATIC,
&objfile->global_psymbols,
- 0, nlist.n_value,
- psymtab_language, objfile);
+ nlist.n_value, psymtab_language, objfile);
continue;
case 'T':
add_psymbol_to_list (sym_name, sym_len, 1,
STRUCT_DOMAIN, LOC_TYPEDEF,
&objfile->static_psymbols,
- nlist.n_value, 0,
- psymtab_language, objfile);
+ 0, psymtab_language, objfile);
if (p[2] == 't')
{
/* Also a typedef with the same name. */
add_psymbol_to_list (sym_name, sym_len, 1,
VAR_DOMAIN, LOC_TYPEDEF,
&objfile->static_psymbols,
- nlist.n_value, 0,
- psymtab_language, objfile);
+ 0, psymtab_language, objfile);
p += 1;
}
}
add_psymbol_to_list (sym_name, sym_len, 1,
VAR_DOMAIN, LOC_TYPEDEF,
&objfile->static_psymbols,
- nlist.n_value, 0,
- psymtab_language, objfile);
+ 0, psymtab_language, objfile);
}
check_enum:
/* If this is an enumerated type, we need to
add_psymbol_to_list (p, q - p, 1,
VAR_DOMAIN, LOC_CONST,
&objfile->static_psymbols, 0,
- 0, psymtab_language, objfile);
+ psymtab_language, objfile);
/* Point past the name. */
p = q;
/* Skip over the value. */
/* Constant, e.g. from "const" in Pascal. */
add_psymbol_to_list (sym_name, sym_len, 1,
VAR_DOMAIN, LOC_CONST,
- &objfile->static_psymbols, nlist.n_value,
- 0, psymtab_language, objfile);
+ &objfile->static_psymbols, 0,
+ psymtab_language, objfile);
continue;
case 'f':
add_psymbol_to_list (sym_name, sym_len, 1,
VAR_DOMAIN, LOC_BLOCK,
&objfile->static_psymbols,
- 0, nlist.n_value,
- psymtab_language, objfile);
+ nlist.n_value, psymtab_language, objfile);
continue;
/* Global functions were ignored here, but now they
add_psymbol_to_list (sym_name, sym_len, 1,
VAR_DOMAIN, LOC_BLOCK,
&objfile->global_psymbols,
- 0, nlist.n_value,
- psymtab_language, objfile);
+ nlist.n_value, psymtab_language, objfile);
continue;
/* Two things show up here (hopefully); static symbols of
built_actual_name != NULL,
VAR_DOMAIN, LOC_BLOCK,
&objfile->global_psymbols,
- 0, addr, cu->language, objfile);
+ addr, cu->language, objfile);
}
else
{
built_actual_name != NULL,
VAR_DOMAIN, LOC_BLOCK,
&objfile->static_psymbols,
- 0, addr, cu->language, objfile);
+ addr, cu->language, objfile);
}
break;
case DW_TAG_constant:
list = &objfile->static_psymbols;
add_psymbol_to_list (actual_name, strlen (actual_name),
built_actual_name != NULL, VAR_DOMAIN, LOC_STATIC,
- list, 0, 0, cu->language, objfile);
+ list, 0, cu->language, objfile);
}
break;
case DW_TAG_variable:
built_actual_name != NULL,
VAR_DOMAIN, LOC_STATIC,
&objfile->global_psymbols,
- 0, addr + baseaddr,
+ addr + baseaddr,
cu->language, objfile);
}
else
built_actual_name != NULL,
VAR_DOMAIN, LOC_STATIC,
&objfile->static_psymbols,
- 0,
has_loc ? addr + baseaddr : (CORE_ADDR) 0,
cu->language, objfile);
}
built_actual_name != NULL,
VAR_DOMAIN, LOC_TYPEDEF,
&objfile->static_psymbols,
- 0, (CORE_ADDR) 0, cu->language, objfile);
+ 0, cu->language, objfile);
break;
case DW_TAG_imported_declaration:
case DW_TAG_namespace:
built_actual_name != NULL,
VAR_DOMAIN, LOC_TYPEDEF,
&objfile->global_psymbols,
- 0, (CORE_ADDR) 0, cu->language, objfile);
+ 0, cu->language, objfile);
break;
case DW_TAG_module:
add_psymbol_to_list (actual_name, strlen (actual_name),
built_actual_name != NULL,
MODULE_DOMAIN, LOC_TYPEDEF,
&objfile->global_psymbols,
- 0, (CORE_ADDR) 0, cu->language, objfile);
+ 0, cu->language, objfile);
break;
case DW_TAG_class_type:
case DW_TAG_interface_type:
|| cu->language == language_java)
? &objfile->global_psymbols
: &objfile->static_psymbols,
- 0, (CORE_ADDR) 0, cu->language, objfile);
+ 0, cu->language, objfile);
break;
case DW_TAG_enumerator:
|| cu->language == language_java)
? &objfile->global_psymbols
: &objfile->static_psymbols,
- 0, (CORE_ADDR) 0, cu->language, objfile);
+ 0, cu->language, objfile);
break;
default:
break;
add_psymbol_to_list (part_die->name, strlen (part_die->name), 0,
VAR_DOMAIN, LOC_TYPEDEF,
&objfile->static_psymbols,
- 0, (CORE_ADDR) 0, cu->language, objfile);
+ 0, cu->language, objfile);
info_ptr = locate_pdi_sibling (reader, part_die, info_ptr);
continue;
}
|| cu->language == language_java)
? &objfile->global_psymbols
: &objfile->static_psymbols,
- 0, (CORE_ADDR) 0, cu->language, objfile);
+ 0, cu->language, objfile);
info_ptr = locate_pdi_sibling (reader, part_die, info_ptr);
continue;
add_psymbol_to_list (namestring, p - namestring, 1,
VAR_DOMAIN, LOC_STATIC,
&objfile->static_psymbols,
- 0, sh.value,
+ sh.value,
psymtab_language, objfile);
continue;
case 'G':
add_psymbol_to_list (namestring, p - namestring, 1,
VAR_DOMAIN, LOC_STATIC,
&objfile->global_psymbols,
- 0, sh.value,
+ sh.value,
psymtab_language, objfile);
continue;
add_psymbol_to_list (namestring, p - namestring, 1,
STRUCT_DOMAIN, LOC_TYPEDEF,
&objfile->static_psymbols,
- sh.value, 0,
- psymtab_language, objfile);
+ 0, psymtab_language, objfile);
if (p[2] == 't')
{
/* Also a typedef with the same name. */
p - namestring, 1,
VAR_DOMAIN, LOC_TYPEDEF,
&objfile->static_psymbols,
- sh.value, 0,
- psymtab_language,
+ 0, psymtab_language,
objfile);
p += 1;
}
add_psymbol_to_list (namestring, p - namestring, 1,
VAR_DOMAIN, LOC_TYPEDEF,
&objfile->static_psymbols,
- sh.value, 0,
- psymtab_language, objfile);
+ 0, psymtab_language, objfile);
}
check_enum:
/* If this is an enumerated type, we need to add
add_psymbol_to_list (p, q - p, 1,
VAR_DOMAIN, LOC_CONST,
&objfile->static_psymbols,
- 0, 0, psymtab_language,
+ 0, psymtab_language,
objfile);
/* Point past the name. */
p = q;
add_psymbol_to_list (namestring, p - namestring, 1,
VAR_DOMAIN, LOC_CONST,
&objfile->static_psymbols,
- sh.value, 0, psymtab_language,
- objfile);
+ 0, psymtab_language, objfile);
continue;
case 'f':
add_psymbol_to_list (namestring, p - namestring, 1,
VAR_DOMAIN, LOC_BLOCK,
&objfile->static_psymbols,
- 0, sh.value,
+ sh.value,
psymtab_language, objfile);
continue;
add_psymbol_to_list (namestring, p - namestring, 1,
VAR_DOMAIN, LOC_BLOCK,
&objfile->global_psymbols,
- 0, sh.value,
+ sh.value,
psymtab_language, objfile);
continue;
add_psymbol_to_list (name, strlen (name), 1,
VAR_DOMAIN, LOC_BLOCK,
&objfile->global_psymbols,
- 0, sh.value, psymtab_language, objfile);
+ sh.value, psymtab_language, objfile);
else
add_psymbol_to_list (name, strlen (name), 1,
VAR_DOMAIN, LOC_BLOCK,
&objfile->static_psymbols,
- 0, sh.value, psymtab_language, objfile);
+ sh.value, psymtab_language, objfile);
procaddr = sh.value;
add_psymbol_to_list (name, strlen (name), 1,
STRUCT_DOMAIN, LOC_TYPEDEF,
&objfile->static_psymbols,
- 0, (CORE_ADDR) 0,
- psymtab_language, objfile);
+ 0, psymtab_language, objfile);
}
handle_psymbol_enumerators (objfile, fh, sh.st, sh.value);
add_psymbol_to_list (name, strlen (name), 1,
VAR_DOMAIN, theclass,
&objfile->static_psymbols,
- 0, sh.value, psymtab_language, objfile);
+ sh.value, psymtab_language, objfile);
skip:
cur_sdx++; /* Go to next file symbol. */
}
add_psymbol_to_list (name, strlen (name), 1,
VAR_DOMAIN, theclass,
&objfile->global_psymbols,
- 0, svalue,
- psymtab_language, objfile);
+ svalue, psymtab_language, objfile);
}
}
in psymtabs, just in symtabs. */
add_psymbol_to_list (name, strlen (name), 1,
VAR_DOMAIN, LOC_CONST,
- &objfile->static_psymbols, 0,
- (CORE_ADDR) 0, psymtab_language, objfile);
+ &objfile->static_psymbols,
+ 0, psymtab_language, objfile);
ext_sym += external_sym_size;
}
}
int, domain_enum,
enum address_class,
struct psymbol_allocation_list *,
- long, CORE_ADDR,
+ CORE_ADDR,
enum language, struct objfile *);
extern void init_psymbol_list (struct objfile *, int);
add_psymbol_to_bcache (const char *name, int namelength, int copy_name,
domain_enum domain,
enum address_class theclass,
- long val, /* Value as a long */
- CORE_ADDR coreaddr, /* Value as a CORE_ADDR */
+ CORE_ADDR coreaddr,
enum language language, struct objfile *objfile,
int *added)
{
holes. */
memset (&psymbol, 0, sizeof (psymbol));
- /* val and coreaddr are mutually exclusive, one of them *will* be zero. */
- if (val != 0)
- {
- SYMBOL_VALUE (&psymbol) = val;
- }
- else
- {
- SYMBOL_VALUE_ADDRESS (&psymbol) = coreaddr;
- }
+ SYMBOL_VALUE_ADDRESS (&psymbol) = coreaddr;
SYMBOL_SECTION (&psymbol) = -1;
SYMBOL_SET_LANGUAGE (&psymbol, language, &objfile->objfile_obstack);
PSYMBOL_DOMAIN (&psymbol) = domain;
/* Add a symbol with a long value to a psymtab.
Since one arg is a struct, we pass in a ptr and deref it (sigh).
+ The only value we need to store for psyms is an address.
+ For all other psyms pass zero for COREADDR.
Return the partial symbol that has been added. */
void
domain_enum domain,
enum address_class theclass,
struct psymbol_allocation_list *list,
- long val, /* Value as a long */
- CORE_ADDR coreaddr, /* Value as a CORE_ADDR */
+ CORE_ADDR coreaddr,
enum language language, struct objfile *objfile)
{
const struct partial_symbol *psym;
/* Stash the partial symbol away in the cache. */
psym = add_psymbol_to_bcache (name, namelength, copy_name, domain, theclass,
- val, coreaddr, language, objfile, &added);
+ coreaddr, language, objfile, &added);
/* Do not duplicate global partial symbols. */
if (list == &objfile->global_psymbols
add_psymbol_to_list (namestring, p - namestring, 1,
VAR_DOMAIN, LOC_STATIC,
&objfile->static_psymbols,
- 0, symbol.n_value,
+ symbol.n_value,
psymtab_language, objfile);
continue;
add_psymbol_to_list (namestring, p - namestring, 1,
VAR_DOMAIN, LOC_STATIC,
&objfile->global_psymbols,
- 0, symbol.n_value,
+ symbol.n_value,
psymtab_language, objfile);
continue;
add_psymbol_to_list (namestring, p - namestring, 1,
STRUCT_DOMAIN, LOC_TYPEDEF,
&objfile->static_psymbols,
- symbol.n_value, 0,
- psymtab_language, objfile);
+ 0, psymtab_language, objfile);
if (p[2] == 't')
{
/* Also a typedef with the same name. */
add_psymbol_to_list (namestring, p - namestring, 1,
VAR_DOMAIN, LOC_TYPEDEF,
&objfile->static_psymbols,
- symbol.n_value, 0,
- psymtab_language, objfile);
+ 0, psymtab_language, objfile);
p += 1;
}
}
add_psymbol_to_list (namestring, p - namestring, 1,
VAR_DOMAIN, LOC_TYPEDEF,
&objfile->static_psymbols,
- symbol.n_value, 0,
- psymtab_language, objfile);
+ 0, psymtab_language, objfile);
}
check_enum:
/* If this is an enumerated type, we need to
enum constants in psymtabs, just in symtabs. */
add_psymbol_to_list (p, q - p, 1,
VAR_DOMAIN, LOC_CONST,
- &objfile->static_psymbols, 0,
+ &objfile->static_psymbols,
0, psymtab_language, objfile);
/* Point past the name. */
p = q;
/* Constant, e.g. from "const" in Pascal. */
add_psymbol_to_list (namestring, p - namestring, 1,
VAR_DOMAIN, LOC_CONST,
- &objfile->static_psymbols, symbol.n_value,
+ &objfile->static_psymbols,
0, psymtab_language, objfile);
continue;
add_psymbol_to_list (namestring, p - namestring, 1,
VAR_DOMAIN, LOC_BLOCK,
&objfile->static_psymbols,
- 0, symbol.n_value,
+ symbol.n_value,
psymtab_language, objfile);
continue;
add_psymbol_to_list (namestring, p - namestring, 1,
VAR_DOMAIN, LOC_BLOCK,
&objfile->global_psymbols,
- 0, symbol.n_value,
+ symbol.n_value,
psymtab_language, objfile);
continue;