This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFC/commit 3/4] symfile.c:free_named_symtabs body is commented out...


The entire body of free_named_symtabs is commented out, and it looks
like it has been this way since CVS day 1...

> int
> free_named_symtabs (char *name)
> {
> #if 0
>   /* FIXME:  With the new method of each objfile having it's own
>      psymtab list, this function needs serious rethinking.  In particular,

I haven't taken the time to look at what this is all about... No time
this week.

The issue is that there is another function, cashier_psymtab, which
isn't used anywhere except in the commented-out implementation of
free_named_symtabs.  This generates a -Wunused-function warning.

For now, I did not delete the code, but commented out, along with the rest
of the code that was already commented out as well.  We'll need to decide
what to do. Is this a hole in our implementation, or something that can
now go?...

gdb/ChangeLog:

        * symfile.c (cashier_psymtab): Comment function out.
        Delete declaration.

I'll commit in a couple of days if no one steps in to have a closer look.

---
 gdb/symfile.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/gdb/symfile.c b/gdb/symfile.c
index 89cc07c..5efbae6 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -97,8 +97,6 @@ static void symbol_file_add_main_1 (char *args, int from_tty, int flags);
 
 static void add_symbol_file_command (char *, int);
 
-static void cashier_psymtab (struct partial_symtab *);
-
 bfd *symfile_bfd_open (char *);
 
 int get_section_index (struct objfile *, char *);
@@ -2733,9 +2731,8 @@ clear_symtab_users_cleanup (void *ignore)
    discarded if symbol reading is successful.  */
 
 #if 0
-/* FIXME:  As free_named_symtabs is currently a big noop this function
-   is no longer needed.  */
-static void clear_symtab_users_once (void);
+/* FIXME:  As free_named_symtabs is currently a big noop these functions
+   are no longer needed.  */
 
 static int clear_symtab_users_queued;
 static int clear_symtab_users_done;
@@ -2750,7 +2747,6 @@ clear_symtab_users_once (void)
 
   clear_symtab_users ();
 }
-#endif
 
 /* Delete the specified psymtab, and any others that reference it.  */
 
@@ -2797,6 +2793,7 @@ cashier_psymtab (struct partial_symtab *pst)
 	}
     }
 }
+#endif
 
 /* If a symtab or psymtab for filename NAME is found, free it along
    with any dependent breakpoints, displays, etc.
-- 
1.6.3.3


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]