This is the mail archive of the gdb@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]

Re: program spaces vs exec


On Thursday 06 October 2011 20:34:48, Tom Tromey wrote:
> Forgot to reply to part...
> 
> Pedro> How do pretty-printers from a shared library that unloads go
> Pedro> away?
> 
> Tom> Generally they are attached to the objfile.  So, they disappear
> Tom> automatically when the objfile is removed.
> 
> Pedro> There must be something more to the issue then.  Both "file foo" or
> Pedro> an exec get rid of the previous executable's symfile_objfile and
> Pedro> create a new one too, so the executable's printers must already be
> Pedro> being removed.
> 
> That would work if the printer was attached to the executable's objfile;
> but you can also attach a printer to a program space, which is the
> problem case.

Then this isn't just about execs indeed, and I don't understand
the usefulness of attaching a printer to the program space.
The program space is the same even if you run -> kill -> run -> `attach to some
other process running some other program' -> kill -> "target remote :9999" ->
etc.

-- 
Pedro Alves


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