[2/3] Fix a couple of comments
Commit Message
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
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
>>>>> "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
@@ -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);
@@ -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)