From: Eli Zaretskii <eliz@elta.co.il>
To: "Kotian, Deepak" <Deepak.Kotian@patni.com>
Cc: gdb@sources.redhat.com
Subject: Re: Debugging a gdb source
Date: Tue, 09 Mar 2004 06:49:00 -0000 [thread overview]
Message-ID: <uad2qsec5.fsf@elta.co.il> (raw)
In-Reply-To: <374639AB1012AA4C840022842AA95BC2016D1514@ruby.patni.com> (Deepak.Kotian@patni.com)
> Date: Tue, 9 Mar 2004 11:23:25 +0530
> From: "Kotian, Deepak" <Deepak.Kotian@patni.com>
>
> I am trying to debug gdb source on Linux using already installed
> dedugger ddd or gdb.
> The source code text does not seem to be in sync with the
> execution when we do step. How do I get it in sync, please
> let me know. The -g option seems to be set in the Makefile.
Most probably, this happens because GDB is compiled with
optimizations. I usually find this not to be much of a nuisance, I
just need to remember stepping a couple of times more until the line
I'm interested in stops being printed by GDB as the current line; then
I know that this line's code finished being executed, and the
variables whose values it modifies can be examined.
If you are annoyed by this, I suggest to rebuild GDB without
optimizations. Caveat emptor: doing so might cause the problems you
are debugging to go away. That is why I suggest to get used to
debugging the optimized code.
next prev parent reply other threads:[~2004-03-09 6:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-09 5:48 Kotian, Deepak
2004-03-09 6:49 ` Eli Zaretskii [this message]
2004-03-09 6:54 ` linker dies building GDB (ppc64) Manoj Iyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=uad2qsec5.fsf@elta.co.il \
--to=eliz@elta.co.il \
--cc=Deepak.Kotian@patni.com \
--cc=gdb@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox