program spaces vs exec

Tom Tromey tromey@redhat.com
Thu Oct 6 19:35:00 GMT 2011


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.

Tom



More information about the Gdb mailing list