[review] Introduce program_space::add_objfile

Tom Tromey (Code Review) gerrit@gnutoolchain-gerrit.osci.io
Mon Nov 4 17:16:00 GMT 2019


Tom Tromey has posted comments on this change.

Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/495
......................................................................


Patch Set 1:

(1 comment)

https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/495/1/gdb/objfiles.c 
File gdb/objfiles.c:

https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/495/1/gdb/objfiles.c@512 
PS1, Line 512: 
502 | objfile::make (bfd *bfd_, const char *name_, objfile_flags flags_,
    | ...
507 |     add_separate_debug_objfile (result, parent);
508 | 
509 |   current_program_space->add_objfile (result, parent);
510 | 
511 |   /* Rebuild section map next time we need it.  */
512 >   get_objfile_pspace_data (current_program_space)->new_objfiles_available = 1;
513 | 
514 |   return result;
515 | }
516 | 
517 | /* See objfiles.h.  */

> Maybe this should be done by add_objfile instead?

The objfile module stores some state on the program space, so 
I think it's probably something that should be kept here.
At least, for the time being; maybe this should just be a field
on the program space instead of a side object; I am not sure.



-- 
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I93e8525dda631cb89dcc2046a5c51c7c9f34ccfd
Gerrit-Change-Number: 495
Gerrit-PatchSet: 1
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-Reviewer: Tom Tromey <tromey@sourceware.org>
Gerrit-CC: Christian Biesinger <cbiesinger@google.com>
Gerrit-Comment-Date: Mon, 04 Nov 2019 17:16:22 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Christian Biesinger <cbiesinger@google.com>
Gerrit-MessageType: comment



More information about the Gdb-patches mailing list