aboutsummaryrefslogtreecommitdiff
path: root/gdb/symfile.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2008-08-05 20:41:16 +0000
committerTom Tromey <tromey@redhat.com>2008-08-05 20:41:16 +0000
commit11d31d9471cd17e3256b5583a79a7889c4fce645 (patch)
tree5cd66e0b659b971d44f57433554b08010bdd44b7 /gdb/symfile.c
parent4094fdc2084d7c9b9bec9f00354c946c739e1d4f (diff)
downloadgdb-11d31d9471cd17e3256b5583a79a7889c4fce645.zip
gdb-11d31d9471cd17e3256b5583a79a7889c4fce645.tar.gz
gdb-11d31d9471cd17e3256b5583a79a7889c4fce645.tar.bz2
* symfile.c (add_psymbol_to_bcache): Return a const pointer. Use
bcache_full. (append_psymbol_to_list): Accept a const pointer. (add_psymbol_to_list): Fix const correctness. * bcache.h: (deprecated_bcache_added, deprecated_bcache): Remove. (bcache_full): Declare. * bcache.c (bcache_data, deprecated_bcache): Remove. (bcache): Use bcache_full. (bcache_full): Rename from deprecated_bcache_added. Change return type.
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r--gdb/symfile.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 1825641..e0d94f3 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -3099,7 +3099,7 @@ start_psymtab_common (struct objfile *objfile,
structure. In other words, having two symbols with the same name but
different domain (or address) is possible and correct. */
-static struct partial_symbol *
+static const struct partial_symbol *
add_psymbol_to_bcache (char *name, int namelength, domain_enum domain,
enum address_class class,
long val, /* Value as a long */
@@ -3137,8 +3137,8 @@ add_psymbol_to_bcache (char *name, int namelength, domain_enum domain,
SYMBOL_SET_NAMES (&psymbol, buf, namelength, objfile);
/* Stash the partial symbol away in the cache */
- return deprecated_bcache_added (&psymbol, sizeof (struct partial_symbol),
- objfile->psymbol_cache, added);
+ return bcache_full (&psymbol, sizeof (struct partial_symbol),
+ objfile->psymbol_cache, added);
}
/* Helper function, adds partial symbol to the given partial symbol
@@ -3146,12 +3146,12 @@ add_psymbol_to_bcache (char *name, int namelength, domain_enum domain,
static void
append_psymbol_to_list (struct psymbol_allocation_list *list,
- struct partial_symbol *psym,
+ const struct partial_symbol *psym,
struct objfile *objfile)
{
if (list->next >= list->list + list->size)
extend_psymbol_list (list, objfile);
- *list->next++ = psym;
+ *list->next++ = (struct partial_symbol *) psym;
OBJSTAT (objfile, n_psyms++);
}
@@ -3178,7 +3178,7 @@ add_psymbol_to_list (char *name, int namelength, domain_enum domain,
CORE_ADDR coreaddr, /* Value as a CORE_ADDR */
enum language language, struct objfile *objfile)
{
- struct partial_symbol *psym;
+ const struct partial_symbol *psym;
int added;