aboutsummaryrefslogtreecommitdiff
path: root/gdb/psymtab.c
diff options
context:
space:
mode:
authorDoug Evans <xdje42@gmail.com>2015-08-15 22:08:47 -0700
committerDoug Evans <xdje42@gmail.com>2015-08-15 22:08:47 -0700
commit1762568fd6bd84f1b1a488375cf320a1efa06b22 (patch)
tree898c98d00e5505b0d4943496820d1fb6ee41f753 /gdb/psymtab.c
parenta40f728f5cb20a41cfff68ef523a0025bbc6f402 (diff)
downloadgdb-1762568fd6bd84f1b1a488375cf320a1efa06b22.zip
gdb-1762568fd6bd84f1b1a488375cf320a1efa06b22.tar.gz
gdb-1762568fd6bd84f1b1a488375cf320a1efa06b22.tar.bz2
psymtab.c (add_psymbol_to_bcache): Remove "val" arg.
gdb/ChangeLog: * psymtab.c (add_psymbol_to_bcache): Remove "val" arg. All callers updated. (add_psymbol_to_list): Ditto.
Diffstat (limited to 'gdb/psymtab.c')
-rw-r--r--gdb/psymtab.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/gdb/psymtab.c b/gdb/psymtab.c
index 5d0aa1c..3c9f5ac 100644
--- a/gdb/psymtab.c
+++ b/gdb/psymtab.c
@@ -1640,8 +1640,7 @@ static const struct partial_symbol *
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)
{
@@ -1652,15 +1651,7 @@ add_psymbol_to_bcache (const char *name, int namelength, int copy_name,
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;
@@ -1716,6 +1707,8 @@ append_psymbol_to_list (struct psymbol_allocation_list *list,
/* 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
@@ -1723,8 +1716,7 @@ add_psymbol_to_list (const char *name, int namelength, int copy_name,
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;
@@ -1733,7 +1725,7 @@ add_psymbol_to_list (const char *name, int namelength, int copy_name,
/* 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