aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2012-01-26 22:19:59 +0000
committerDoug Evans <dje@google.com>2012-01-26 22:19:59 +0000
commit7dc254837ea14a6206bd2e047c45b07649e60938 (patch)
treee85387c37fa2b10f8f03f6befe977a879d630dbb
parent78d8b4d76db296a378e3780806d2c4fafc2572ee (diff)
downloadgdb-7dc254837ea14a6206bd2e047c45b07649e60938.zip
gdb-7dc254837ea14a6206bd2e047c45b07649e60938.tar.gz
gdb-7dc254837ea14a6206bd2e047c45b07649e60938.tar.bz2
* psymtab.c (add_psymbol_to_list): Result is now "void".
* psympriv.h (add_psymbol_to_list): Update.
-rw-r--r--gdb/ChangeLog3
-rw-r--r--gdb/psympriv.h13
-rw-r--r--gdb/psymtab.c16
3 files changed, 11 insertions, 21 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 49f2083..1699332 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,8 @@
2012-01-26 Doug Evans <dje@google.com>
+ * psymtab.c (add_psymbol_to_list): Result is now "void".
+ * psympriv.h (add_psymbol_to_list): Update.
+
* dwarf2read.c (add_partial_symbol): Delete local psym, unused.
2012-01-26 Jan Kratochvil <jan.kratochvil@redhat.com>
diff --git a/gdb/psympriv.h b/gdb/psympriv.h
index 7cf9260..df7b874 100644
--- a/gdb/psympriv.h
+++ b/gdb/psympriv.h
@@ -164,13 +164,12 @@ extern void sort_pst_symbols (struct partial_symtab *);
/* Add any kind of symbol to a psymbol_allocation_list. */
-extern const
-struct partial_symbol *add_psymbol_to_list (const char *, int,
- int, domain_enum,
- enum address_class,
- struct psymbol_allocation_list *,
- long, CORE_ADDR,
- enum language, struct objfile *);
+extern void add_psymbol_to_list (const char *, int,
+ int, domain_enum,
+ enum address_class,
+ struct psymbol_allocation_list *,
+ long, CORE_ADDR,
+ enum language, struct objfile *);
extern void init_psymbol_list (struct objfile *, int);
diff --git a/gdb/psymtab.c b/gdb/psymtab.c
index 4d3dced..e42545b 100644
--- a/gdb/psymtab.c
+++ b/gdb/psymtab.c
@@ -1566,18 +1566,7 @@ append_psymbol_to_list (struct psymbol_allocation_list *list,
Since one arg is a struct, we pass in a ptr and deref it (sigh).
Return the partial symbol that has been added. */
-/* NOTE: carlton/2003-09-11: The reason why we return the partial
- symbol is so that callers can get access to the symbol's demangled
- name, which they don't have any cheap way to determine otherwise.
- (Currenly, dwarf2read.c is the only file who uses that information,
- though it's possible that other readers might in the future.)
- Elena wasn't thrilled about that, and I don't blame her, but we
- couldn't come up with a better way to get that information. If
- it's needed in other situations, we could consider breaking up
- SYMBOL_SET_NAMES to provide access to the demangled name lookup
- cache. */
-
-const struct partial_symbol *
+void
add_psymbol_to_list (const char *name, int namelength, int copy_name,
domain_enum domain,
enum address_class class,
@@ -1597,11 +1586,10 @@ add_psymbol_to_list (const char *name, int namelength, int copy_name,
/* Do not duplicate global partial symbols. */
if (list == &objfile->global_psymbols
&& !added)
- return psym;
+ return;
/* Save pointer to partial symbol in psymtab, growing symtab if needed. */
append_psymbol_to_list (list, psym, objfile);
- return psym;
}
/* Initialize storage for partial symbols. */