This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: preserving gdb symbols
On Thu, Sep 14, 2006 at 10:49:09AM -0700, Lee wrote:
> Currently i have to use a script to read all of the
> loaded statements, parse it, and pipe that out and tar
> up all of the needed libraries so that I can get
> matching binaries for shared libraries and have a
> useful core to read.
Just try "info shared". It'll work even if you don't have the
libraries physically present (well, on most systems).
> So my question is first of all is there any way I can
> just save all of the symbol information I have in
> memory, so that I can reload it when reading the core
> on a different machine.
No. Save the files instead.
> I modified solib_read_symbols. I changed it so that
> if you added a switch on gdb's command line then each
> time a call was made to solib_read_symbols I then kept
> the file. In my case I used the command interface to
> exec tar. A person could tack them on the end of the
> core file, or create your own package in whatever
> format is generally acceptable. Would a solution of
> anything like this be acceptable to get back into the
> gdb source ?
I think you could relatively easily do this as a wrapper script
that invoked GDB. We already ship one such (for gcore); if
you wanted to add another, I think that would be reasonable.
--
Daniel Jacobowitz
CodeSourcery