mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-15 11:56:11 +08:00
* objfiles.h (clear_objfile_data): New prototype.
* objfiles.c (clear_objfile_data): New function. * symfile.c (reread_symbols): Clear per-objfile data.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2003-10-29 Mark Kettenis <kettenis@gnu.org>
|
||||||
|
|
||||||
|
* objfiles.h (clear_objfile_data): New prototype.
|
||||||
|
* objfiles.c (clear_objfile_data): New function.
|
||||||
|
* symfile.c (reread_symbols): Clear per-objfile data.
|
||||||
|
|
||||||
2003-10-28 Jeff Johnston <jjohnstn@redhat.com>
|
2003-10-28 Jeff Johnston <jjohnstn@redhat.com>
|
||||||
|
|
||||||
* symfile.c (symbol_file_add_with_addrs_or_offsets): Switch to use
|
* symfile.c (symbol_file_add_with_addrs_or_offsets): Switch to use
|
||||||
|
@ -1165,6 +1165,13 @@ objfile_free_data (struct objfile *objfile)
|
|||||||
objfile->data = NULL;
|
objfile->data = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
clear_objfile_data (struct objfile *objfile)
|
||||||
|
{
|
||||||
|
gdb_assert (objfile->data != NULL);
|
||||||
|
memset (objfile->data, 0, objfile->num_data * sizeof (void *));
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
set_objfile_data (struct objfile *objfile, const struct objfile_data *data,
|
set_objfile_data (struct objfile *objfile, const struct objfile_data *data,
|
||||||
void *value)
|
void *value)
|
||||||
|
@ -599,6 +599,7 @@ extern int is_in_import_list (char *, struct objfile *);
|
|||||||
modules. */
|
modules. */
|
||||||
|
|
||||||
extern const struct objfile_data *register_objfile_data (void);
|
extern const struct objfile_data *register_objfile_data (void);
|
||||||
|
extern void clear_objfile_data (struct objfile *objfile);
|
||||||
extern void set_objfile_data (struct objfile *objfile,
|
extern void set_objfile_data (struct objfile *objfile,
|
||||||
const struct objfile_data *data, void *value);
|
const struct objfile_data *data, void *value);
|
||||||
extern void *objfile_data (struct objfile *objfile,
|
extern void *objfile_data (struct objfile *objfile,
|
||||||
|
@ -1969,6 +1969,7 @@ reread_symbols (void)
|
|||||||
memset (&objfile->msymbol_demangled_hash, 0,
|
memset (&objfile->msymbol_demangled_hash, 0,
|
||||||
sizeof (objfile->msymbol_demangled_hash));
|
sizeof (objfile->msymbol_demangled_hash));
|
||||||
objfile->fundamental_types = NULL;
|
objfile->fundamental_types = NULL;
|
||||||
|
clear_objfile_data (objfile);
|
||||||
if (objfile->sf != NULL)
|
if (objfile->sf != NULL)
|
||||||
{
|
{
|
||||||
(*objfile->sf->sym_finish) (objfile);
|
(*objfile->sf->sym_finish) (objfile);
|
||||||
|
Reference in New Issue
Block a user