aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2000-05-16 04:07:39 +0000
committerAndrew Cagney <cagney@redhat.com>2000-05-16 04:07:39 +0000
commit56e290f494ab802bbc5c26c445dad0d1e6a7f37b (patch)
tree3c7c935437ec8b5f5c8e517536e64c4f031fb6ae
parent1ed2a1352d4af2d840b285a741bc02d4584c24f1 (diff)
downloadfsf-binutils-gdb-56e290f494ab802bbc5c26c445dad0d1e6a7f37b.zip
fsf-binutils-gdb-56e290f494ab802bbc5c26c445dad0d1e6a7f37b.tar.gz
fsf-binutils-gdb-56e290f494ab802bbc5c26c445dad0d1e6a7f37b.tar.bz2
Cleanup discard_minimal_symbols cleanup.
-rw-r--r--gdb/ChangeLog14
-rw-r--r--gdb/coffread.c2
-rw-r--r--gdb/dbxread.c2
-rw-r--r--gdb/dstread.c2
-rw-r--r--gdb/elfread.c2
-rw-r--r--gdb/minsyms.c13
-rw-r--r--gdb/mipsread.c2
-rw-r--r--gdb/nlmread.c2
-rw-r--r--gdb/os9kread.c2
-rw-r--r--gdb/solib.c2
-rw-r--r--gdb/somread.c2
-rw-r--r--gdb/symtab.h3
-rw-r--r--gdb/xcoffread.c2
13 files changed, 34 insertions, 16 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 2903feb..aa37cd5 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,17 @@
+Tue May 16 13:30:08 2000 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * symtab.h (make_cleanup_discard_minimal_symbols): Replace
+ discard_minimal_symbols.
+ * minsyms.c (make_cleanup_discard_minimal_symbols):
+ (do_discard_minimal_symbols_cleanup): New functions.
+
+ * xcoffread.c (xcoff_initial_scan), somread.c (som_symfile_read),
+ solib.c (solib_add_common_symbols), os9kread.c
+ (os9k_symfile_read), nlmread.c (nlm_symfile_read), mipsread.c
+ (mipscoff_symfile_read), elfread.c (elf_symfile_read), dstread.c
+ (dst_symfile_read), dbxread.c (dbx_symfile_read), coffread.c
+ (coff_symfile_read): Replace make_cleanup.
+
Mon May 15 09:32:31 2000 Andrew Cagney <cagney@b1.cygnus.com>
* command.h (add_set_cmd): Change VAR parameter to void pointer.
diff --git a/gdb/coffread.c b/gdb/coffread.c
index 7b9f5af..010b36a 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -670,7 +670,7 @@ coff_symfile_read (objfile, mainline)
error ("\"%s\": can't get string table", name);
init_minimal_symbol_collection ();
- make_cleanup ((make_cleanup_func) discard_minimal_symbols, 0);
+ make_cleanup_discard_minimal_symbols ();
/* Now that the executable file is positioned at symbol table,
process it and define symbols accordingly. */
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index 25302de..4c38fb4 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -624,7 +624,7 @@ dbx_symfile_read (objfile, mainline)
back_to = make_cleanup (really_free_pendings, 0);
init_minimal_symbol_collection ();
- make_cleanup ((make_cleanup_func) discard_minimal_symbols, 0);
+ make_cleanup_discard_minimal_symbols ();
/* Read stabs data from executable file and define symbols. */
diff --git a/gdb/dstread.c b/gdb/dstread.c
index c10c1fe..8b22b14 100644
--- a/gdb/dstread.c
+++ b/gdb/dstread.c
@@ -288,7 +288,7 @@ dst_symfile_read (objfile, mainline)
error ("\"%s\": error reading debugging symbol tables\n", name);
init_minimal_symbol_collection ();
- make_cleanup (discard_minimal_symbols, 0);
+ make_cleanup_discard_minimal_symbols ();
/* Now that the executable file is positioned at symbol table,
process it and define symbols accordingly. */
diff --git a/gdb/elfread.c b/gdb/elfread.c
index 60f7988..4d9376d 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -591,7 +591,7 @@ elf_symfile_read (objfile, mainline)
CORE_ADDR offset;
init_minimal_symbol_collection ();
- back_to = make_cleanup ((make_cleanup_func) discard_minimal_symbols, 0);
+ back_to = make_cleanup_discard_minimal_symbols ();
memset ((char *) &ei, 0, sizeof (ei));
diff --git a/gdb/minsyms.c b/gdb/minsyms.c
index a032dd3..0e24663 100644
--- a/gdb/minsyms.c
+++ b/gdb/minsyms.c
@@ -743,10 +743,8 @@ compare_minimal_symbols (fn1p, fn2p)
obstack and then simply blow the obstack away when we are done with
it. Is it worth the extra trouble though? */
-/* ARGSUSED */
-void
-discard_minimal_symbols (foo)
- int foo;
+static void
+do_discard_minimal_symbols_cleanup (void *arg)
{
register struct msym_bunch *next;
@@ -758,6 +756,13 @@ discard_minimal_symbols (foo)
}
}
+struct cleanup *
+make_cleanup_discard_minimal_symbols (void)
+{
+ return make_cleanup (do_discard_minimal_symbols_cleanup, 0);
+}
+
+
/* Compact duplicate entries out of a minimal symbol table by walking
through the table and compacting out entries with duplicate addresses
diff --git a/gdb/mipsread.c b/gdb/mipsread.c
index 9d8f0ff..2795418 100644
--- a/gdb/mipsread.c
+++ b/gdb/mipsread.c
@@ -94,7 +94,7 @@ mipscoff_symfile_read (objfile, mainline)
struct cleanup *back_to;
init_minimal_symbol_collection ();
- back_to = make_cleanup ((make_cleanup_func) discard_minimal_symbols, 0);
+ back_to = make_cleanup_discard_minimal_symbols ();
/* Now that the executable file is positioned at symbol table,
process it and define symbols accordingly. */
diff --git a/gdb/nlmread.c b/gdb/nlmread.c
index 03413b3..e83e554 100644
--- a/gdb/nlmread.c
+++ b/gdb/nlmread.c
@@ -192,7 +192,7 @@ nlm_symfile_read (objfile, mainline)
struct symbol *mainsym;
init_minimal_symbol_collection ();
- back_to = make_cleanup ((make_cleanup_func) discard_minimal_symbols, 0);
+ back_to = make_cleanup_discard_minimal_symbols ();
/* FIXME, should take a section_offsets param, not just an offset. */
diff --git a/gdb/os9kread.c b/gdb/os9kread.c
index cbc51a7..daa4597 100644
--- a/gdb/os9kread.c
+++ b/gdb/os9kread.c
@@ -342,7 +342,7 @@ os9k_symfile_read (objfile, mainline)
free_pending_blocks ();
back_to = make_cleanup (really_free_pendings, 0);
- make_cleanup ((make_cleanup_func) discard_minimal_symbols, 0);
+ make_cleanup_discard_minimal_symbols ();
read_minimal_symbols (objfile);
/* Now that the symbol table data of the executable file are all in core,
diff --git a/gdb/solib.c b/gdb/solib.c
index 1094277..0000444 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -445,7 +445,7 @@ solib_add_common_symbols (rtc_symp)
}
init_minimal_symbol_collection ();
- make_cleanup ((make_cleanup_func) discard_minimal_symbols, 0);
+ make_cleanup_discard_minimal_symbols ();
while (rtc_symp)
{
diff --git a/gdb/somread.c b/gdb/somread.c
index 8dda58d..b1370ab 100644
--- a/gdb/somread.c
+++ b/gdb/somread.c
@@ -366,7 +366,7 @@ som_symfile_read (objfile, mainline)
do_pxdb (symfile_bfd_open (objfile->name));
init_minimal_symbol_collection ();
- back_to = make_cleanup ((make_cleanup_func) discard_minimal_symbols, 0);
+ back_to = make_cleanup_discard_minimal_symbols ();
/* Read in the import list and the export list. Currently
the export list isn't used; the import list is used in
diff --git a/gdb/symtab.h b/gdb/symtab.h
index dffb26a..1d3108f 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -1267,8 +1267,7 @@ extern CORE_ADDR
extern void
init_minimal_symbol_collection PARAMS ((void));
-extern void
-discard_minimal_symbols PARAMS ((int));
+extern struct cleanup *make_cleanup_discard_minimal_symbols (void);
extern void
install_minimal_symbols PARAMS ((struct objfile *));
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index 991c83a..586cdab 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -2746,7 +2746,7 @@ xcoff_initial_scan (objfile, mainline)
back_to = make_cleanup (really_free_pendings, 0);
init_minimal_symbol_collection ();
- make_cleanup ((make_cleanup_func) discard_minimal_symbols, 0);
+ make_cleanup_discard_minimal_symbols ();
/* Now that the symbol table data of the executable file are all in core,
process them and define symbols accordingly. */