[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Using gdb on a debian system.

On Mon, Mar 19, 2007 at 03:58:15AM EST, Sven Arvidsson wrote:
> On Sun, 2007-03-18 at 23:53 -0500, cga2000 wrote:
> > I have tried to follow the recommendations I found in various docs,
> > like rebuilding the package via an "apt-get source package" followed
> > by a "dpkg -i package_name" to no effect.
> > 
> > Even if I try to point gdb to the directory that contains the source
> > via the "-d" flag I end up with the dreaded "no symbols table loaded"
> > message. "use the file command".
> The Debian packages are by default stripped of all debugging info. When
> you rebuild the packages yourself, you can choose not to do so. It
> should be much easier than grabbing the upstream source and building it.
> See http://wiki.debian.org/?HowToGetABacktrace

I tried that HowTo but was unable to get it to work.

It's also unclear what these commands do.

Does this end up replacing the normal binaries with a debug version of
the programs?

Where does the output of the "dpkg -i" go?

Am I supposed to reinstall the regular package when I'm done testing?

Is the source package that you download guaranteed to be in sync with
the binary that was installed as a result of an "apt-get install"?

In any event, I had tried what the author of the doc recommends and was
unable to get gdb to do anything apart from giving me the infamous
"unable.." message.

Mind you, I know how to run a debugging session with gdb but I don't
know much about setting it up .. ie. I just write some buggy code, gcc
it and do a "gdb ./buggy_prog .. and it's always worked.

Maybe I should count my blessings and take this as a golden opportunity
to learn a few things about setting up a gdb session.



Reply to: