[prev in list] [next in list] [prev in thread] [next in thread]
List: gdb
Subject: Re: some questions about kernel debugging
From: Jan Kratochvil <jan.kratochvil () redhat ! com>
Date: 2010-07-09 16:20:00
Message-ID: 20100709162000.GA25084 () host0 ! dyn ! jankratochvil ! net
[Download RAW message or body]
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 in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic