Cleanup discard_minimal_symbols cleanup.
authorAndrew Cagney <cagney@redhat.com>
Tue, 16 May 2000 04:07:39 +0000 (04:07 +0000)
committerAndrew Cagney <cagney@redhat.com>
Tue, 16 May 2000 04:07:39 +0000 (04:07 +0000)
13 files changed:
gdb/ChangeLog
gdb/coffread.c
gdb/dbxread.c
gdb/dstread.c
gdb/elfread.c
gdb/minsyms.c
gdb/mipsread.c
gdb/nlmread.c
gdb/os9kread.c
gdb/solib.c
gdb/somread.c
gdb/symtab.h
gdb/xcoffread.c

index 2903feb8fd9d503a2d566de6485a1c03ee418229..aa37cd5386d23b500610af9f1a688e42087059bd 100644 (file)
@@ -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.
index 7b9f5af19801b4d04eddc3639c7d06c930a6f2b7..010b36aea2ce455bf55a7d80801fbd761de783a0 100644 (file)
@@ -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.  */
index 25302de1ccbb02f84a4135f66ccf9cc807bd2e17..4c38fb490ccbbe3c0cd7c49f06de849a54f6bda2 100644 (file)
@@ -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. */
 
index c10c1fe18cc15e9911643562042cdf6c120be099..8b22b144ae7e504f72ec6da64ca20d691e4f59a5 100644 (file)
@@ -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.  */
index 60f7988029b03ea3aa1c5494d9df21eb8998d3c8..4d9376d9c6c70652436a8ab7febbb0121c4041ee 100644 (file)
@@ -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));
 
index a032dd35115cffafcd2ee08609b925cf55203005..0e24663a35eff3090cb4cf3eaef713dc82b5141f 100644 (file)
@@ -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
index 9d8f0ff9ea0d9ed610f7c9755def70ac1f5e1af0..279541812eaaba3bd32d5eda1d988a7667496698 100644 (file)
@@ -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.  */
index 03413b33d80103f585814ffda31ced8fcc37621d..e83e554f529615304663eb0419ee49ea3c5fed50 100644 (file)
@@ -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.  */
 
index cbc51a75e013a259a7ef94eaaa952399830f300f..daa45971d0b014d551f42bffd5245322709bd4bb 100644 (file)
@@ -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,
index 1094277d517dcaa63ddecf6d40b9e930997de12c..0000444f3d002eec79c91fade9866c0c29e8eeea 100644 (file)
@@ -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)
     {
index 8dda58df9cd7b20eb87e11759d1ba14a3f52783b..b1370abffa0a386c693107f4a61e5ca483e31fc0 100644 (file)
@@ -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
index dffb26ae068b0344ed3f54d94f705033ae66d972..1d3108f730deb7764ed123ad12007e03ca274dd6 100644 (file)
@@ -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 *));
index 991c83a372445aa943bf4ba6d1e22b21b1c8264d..586cdab544338db86023c1a750809d6da8e1bc8f 100644 (file)
@@ -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.  */
This page took 0.067113 seconds and 4 git commands to generate.