[2/3] Fix a couple of comments

Message ID 20190409180945.21621-3-tom@tromey.com
State New, archived
Headers

Commit Message

Tom Tromey April 9, 2019, 6:09 p.m. UTC
  While working on objfiles I noticed a typo in one comment, and another
comment that, as far as I can tell, has been obsolete for a very long
time.

gdb/ChangeLog
2019-04-09  Tom Tromey  <tom@tromey.com>

	* symfile.c (reread_symbols): Remove old comment.
	* objfiles.c (free_all_objfiles): Fix a typo.
---
 gdb/ChangeLog  | 5 +++++
 gdb/objfiles.c | 2 +-
 gdb/symfile.c  | 6 ------
 3 files changed, 6 insertions(+), 7 deletions(-)
  

Comments

Simon Marchi April 10, 2019, 1:51 a.m. UTC | #1
On 2019-04-09 2:09 p.m., Tom Tromey wrote:
> While working on objfiles I noticed a typo in one comment, and another
> comment that, as far as I can tell, has been obsolete for a very long
> time.

I don't really understand the comment.  Is it obsolete because what the
comment suggests has been implemented, or it's just not relevant anymore?

Simon
  
Tom Tromey April 10, 2019, 1:22 p.m. UTC | #2
>>>>> "Simon" == Simon Marchi <simark@simark.ca> writes:

Simon> On 2019-04-09 2:09 p.m., Tom Tromey wrote:
>> While working on objfiles I noticed a typo in one comment, and another
>> comment that, as far as I can tell, has been obsolete for a very long
>> time.

Simon> I don't really understand the comment.  Is it obsolete because what the
Simon> comment suggests has been implemented, or it's just not relevant anymore?

The comment was this one in reread_symbols:

-  /* With the addition of shared libraries, this should be modified,
-     the load time should be saved in the partial symbol tables, since
-     different tables may come from different source files.  FIXME.
-     This routine should then walk down each partial symbol table
-     and see if the symbol table that it originates from has been changed.  */

I am not totally sure how to interpret this either.  On the one hand, it
sounds done (objfiles for shared libraries record the mtime, this
function examines those); on the other it sounds confused (partial
symbol tables aren't relevant here).  Maybe there was some ancient time
when shared libraries didn't have separate objfiles?  I do not know.

Tom
  

Patch

diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 1c95e068842..ada5edc42fa 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -699,7 +699,7 @@  free_all_objfiles (void)
 {
   struct so_list *so;
 
-  /* Any objfile referencewould become stale.  */
+  /* Any objfile reference would become stale.  */
   for (so = master_so_list (); so; so = so->next)
     gdb_assert (so->objfile == NULL);
 
diff --git a/gdb/symfile.c b/gdb/symfile.c
index ba82f1b83ca..dd9c4ae9856 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -2432,12 +2432,6 @@  reread_symbols (void)
   int res;
   std::vector<struct objfile *> new_objfiles;
 
-  /* With the addition of shared libraries, this should be modified,
-     the load time should be saved in the partial symbol tables, since
-     different tables may come from different source files.  FIXME.
-     This routine should then walk down each partial symbol table
-     and see if the symbol table that it originates from has been changed.  */
-
   for (objfile *objfile : current_program_space->objfiles ())
     {
       if (objfile->obfd == NULL)