From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: loody <miloody@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: some questions about kernel debugging
Date: Fri, 09 Jul 2010 16:20:00 -0000 [thread overview]
Message-ID: <20100709162000.GA25084@host0.dyn.jankratochvil.net> (raw)
In-Reply-To: <AANLkTim51qdgX_X0AO3fj3XjC5QKuKORstbmnO8ttoz1@mail.gmail.com>
On Fri, 09 Jul 2010 17:56:35 +0200, loody wrote:
> 2010/7/9 Jan Kratochvil <jan.kratochvil@redhat.com>:
> > Besides resolving this -O2 -g problem at GCC the easy way is always to just
> > `disassemble' the code in GDB, guess from the code+source in which
> > register/memory is the value probably located and access it directly there.
>
> I tried compile the kernel with -O1 -g but it still fail.
-O1 should be like -O2 for the debugging...
> does that mean only program compiled with -O0 -g will not get the
> error message when trying to see the variable?
Right. If you succeed to build Linux kernel with -O0 -g (which I doubt) then
GCC should produce correct enough debug information that GDB will be happy.
Regards,
Jan
prev parent reply other threads:[~2010-07-09 16:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-09 11:52 loody
2010-07-09 13:07 ` Jan Kratochvil
2010-07-09 15:56 ` loody
2010-07-09 16:20 ` Jan Kratochvil [this message]
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=20100709162000.GA25084@host0.dyn.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=gdb@sourceware.org \
--cc=miloody@gmail.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