diff options
author | Paul Pluzhnikov <ppluzhnikov@google.com> | 2009-08-04 18:46:05 +0000 |
---|---|---|
committer | Paul Pluzhnikov <ppluzhnikov@google.com> | 2009-08-04 18:46:05 +0000 |
commit | e3c69974ac166b09a48d5b0a971cf4833d293b90 (patch) | |
tree | 78801fae838b5f4b950e8d1632178b030f4f0b62 /gdb/objfiles.h | |
parent | afd0cd3fc15852600db10b246ff5ed1dbb48fc66 (diff) | |
download | gdb-e3c69974ac166b09a48d5b0a971cf4833d293b90.zip gdb-e3c69974ac166b09a48d5b0a971cf4833d293b90.tar.gz gdb-e3c69974ac166b09a48d5b0a971cf4833d293b90.tar.bz2 |
2009-08-04 Paul Pluzhnikov <ppluzhnikov@google.com>
* objfiles.h (OBJF_KEEPBFD): Delete.
(gdb_bfd_unref): New prototype.
* objfiles.c (gdb_bfd_unref): New function.
(free_objfile): Call gdb_bfd_unref.
* solib.c (free_so): Likewise.
(symbol_add_stub): Set refcount.
Diffstat (limited to 'gdb/objfiles.h')
-rw-r--r-- | gdb/objfiles.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/gdb/objfiles.h b/gdb/objfiles.h index 1857260..aecf8d8 100644 --- a/gdb/objfiles.h +++ b/gdb/objfiles.h @@ -414,12 +414,6 @@ struct objfile #define OBJF_USERLOADED (1 << 3) /* User loaded */ -/* The bfd of this objfile is used outside of the objfile (e.g. by solib). - Do not try to free it. */ - -#define OBJF_KEEPBFD (1 << 4) /* Do not delete bfd */ - - /* The object file that the main symbol table was loaded from (e.g. the argument to the "symbol-file" or "file" command). */ @@ -510,6 +504,8 @@ 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); + +extern void gdb_bfd_unref (struct bfd *abfd); /* Traverse all object files. ALL_OBJFILES_SAFE works even if you delete |