Thanks Jason!

I have already removed O2 from the root makefile
(/usr/src/linux-2.6.28/Makefile)

I will try what you mentioned, but I have another doubt now:

The IPsec code is in net/ipv4/esp4.c So I guess I need to add the line
in net/ipv4/Makefile ?

Also what if O2 option is getting passed from somewhere else? In that
case if the compiler gets both O0 and O2 which one will take
precedence?

BRegards,

Anupam.

On Mon, May 11, 2009 at 5:42 PM, Jason Wessel
<[email protected]> wrote:
> Anupam Chomal wrote:
>> Hi,
>>
>> I am sorry if I am posting to the wrong list...
>>
>> I am trying to step through the native IPSec code in 2.6.28. I have
>> done the necessary steps:
>>
>> 1. Compiled the kernel on the development machine.
>> 2. Copied the compiled kernel (Initrd, vmlinuz, and Systemmap) to the
>> test machine.
>> 3. Connected the two using a null modem cable (Have checked that the
>> serial to serial connection is working)
>> 4. I then inserted breakpoints in the test kernel from the development 
>> machine.
>>
>> While trying to step through the IPSec code, I found that the stepping
>> is not the same as the source code. KGDB is not showing the same
>> stepping as the source.
>>
>> Can someone please help?
>>
>
> If by not the same, do you mean that it jumps all over the place in the
> debugger?  If so, that is to be expected if you are using -O2 optimized
> code.
>
> For the files you are most interested in debugging you might be able to
> compile them with a different optimization level.   You do that by
> opening the appropriate kernel makefile and changing the optimization
> level for that file with the CFLAGS_fileName.o rule.  IE:
>
> net/ipv4/netfilter/Makefile
>
> and add at the top:
>
> CFLAGS_iptable_security.o += -O0
>
> Jason.
>

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Kgdb-bugreport mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport

Reply via email to