diff options
author | Mark Kettenis <kettenis@gnu.org> | 2003-08-21 22:35:33 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2003-08-21 22:35:33 +0000 |
commit | cf47fd0f81a49be56490ea7f4dca519fc61fcdfc (patch) | |
tree | 7cdd52e6321678be12785d3b577296824daa9f3f /gdb/objfiles.h | |
parent | 6d0faa448fcfc39fb7edb5dcda717230132c434b (diff) | |
download | gdb-cf47fd0f81a49be56490ea7f4dca519fc61fcdfc.tar.gz |
* objfiles.h (struct objfile): Add memebers `data' and `num_data'.
(register_objfile_data, set_objfile_data, objfile_data): New
prototypes.
* objfiles.c (objfile_alloc_data, objfile_free_data): New
prototypes.
(allocate_objfile): Call objfile_alloc_data.
(free_objfile): Call objfile_free_data.
(struct objfile_data): New.
(struct objfile_data_registration): New.
(struct objfile_data_registry): New.
(objfile_data_registry): New variable.
(register_objfile_data): New function.
(objfile_alloc_data, objfile_free_data): New functions.
(set_objfile_data, objfile_data): New functions.
* dwarf2-frame.c (dwarf2_frame_data): New variable.
(dwarf2_frame_find_fde, add_fde): Use new per-objfile data mechanism.
(_initialize_dwarf2_frame): New function and prototype.
Diffstat (limited to 'gdb/objfiles.h')
-rw-r--r-- | gdb/objfiles.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gdb/objfiles.h b/gdb/objfiles.h index f747a680108..80e61c52348 100644 --- a/gdb/objfiles.h +++ b/gdb/objfiles.h @@ -379,6 +379,13 @@ struct objfile void *obj_private; + /* Per objfile data-pointers required by other GDB modules. */ + /* FIXME: kettenis/20030711: This mechanism could replace + sym_stab_info, sym_private and obj_private entirely. */ + + void **data; + unsigned num_data; + /* Set of relocation offsets to apply to each section. Currently on the psymbol_obstack (which makes no sense, but I'm not sure it's harming anything). @@ -565,6 +572,16 @@ extern int in_plt_section (CORE_ADDR, char *); extern int is_in_import_list (char *, struct objfile *); +/* Keep a registry of per-objfile data-pointers required by other GDB + modules. */ + +extern const struct objfile_data *register_objfile_data (void); +extern void set_objfile_data (struct objfile *objfile, + const struct objfile_data *data, void *value); +extern void *objfile_data (struct objfile *objfile, + const struct objfile_data *data); + + /* Traverse all object files. ALL_OBJFILES_SAFE works even if you delete the objfile during the traversal. */ |