Re: kernel compiled with frame pointer

2000-09-25 Thread Keith Owens
On Mon, 25 Sep 2000 06:21:48 -0500, Robert Redelmeier <[EMAIL PROTECTED]> wrote: >Ah -- I see, you are looking at some sort of kernel debugger. Well, >then one way would be to look at entry and exit points. i386 Frame >pointers are set up with `pushl %ebp / movl %esp, %ebp / subl $local,

Re: kernel compiled with frame pointer

2000-09-25 Thread Robert Redelmeier
Sushil wrote: > > I agree. Sitting in the front of desktop I can see if the source files are > getting compiled with or without -fomit-frame-pointer. But, while writing > a function in a kernel source file, I want to know whether the caller of > this function was compiled with or without

Re: kernel compiled with frame pointer

2000-09-25 Thread Keith Owens
On Mon, 25 Sep 2000 01:11:08 +0530 (IST), Sushil <[EMAIL PROTECTED]> wrote: >I agree. Sitting in the front of desktop I can see if the source files are >getting compiled with or without -fomit-frame-pointer. But, while writing >a function in a kernel source file, I want to know whether the

Re: kernel compiled with frame pointer

2000-09-25 Thread Sushil
On Sun, 24 Sep 2000, Robert Redelmeier wrote: > > I am trying to get the call trace of a process by tracing the return > > addresses on the stack. To get the correct location of the return > > address I need to know whether the kernel is being compiled with > > frame pointer because this

Re: kernel compiled with frame pointer

2000-09-25 Thread Sushil
On Sun, 24 Sep 2000, Robert Redelmeier wrote: I am trying to get the call trace of a process by tracing the return addresses on the stack. To get the correct location of the return address I need to know whether the kernel is being compiled with frame pointer because this will

Re: kernel compiled with frame pointer

2000-09-25 Thread Robert Redelmeier
Sushil wrote: I agree. Sitting in the front of desktop I can see if the source files are getting compiled with or without -fomit-frame-pointer. But, while writing a function in a kernel source file, I want to know whether the caller of this function was compiled with or without

Re: kernel compiled with frame pointer

2000-09-25 Thread Keith Owens
On Mon, 25 Sep 2000 06:21:48 -0500, Robert Redelmeier [EMAIL PROTECTED] wrote: Ah -- I see, you are looking at some sort of kernel debugger. Well, then one way would be to look at entry and exit points. i386 Frame pointers are set up with `pushl %ebp / movl %esp, %ebp / subl $local, %esp` or

Re: kernel compiled with frame pointer

2000-09-24 Thread Sushil
Hi Keith, Thanks for the useful information. > >What about CONFIG_KDB_FRAMEPTR? Is it correct to use this in a standard > >kernel to find whether the kernel is being compiled with frame pointer? > > I don't know which kernel you are looking at. CONFIG_KDB_FRAMEPTR is > part of an old kdb

Re: kernel compiled with frame pointer

2000-09-24 Thread Robert Redelmeier
> I am trying to get the call trace of a process by tracing the return > addresses on the stack. To get the correct location of the return > address I need to know whether the kernel is being compiled with > frame pointer because this will affect the offset of return address > on the stack.

Re: kernel compiled with frame pointer

2000-09-24 Thread Sushil
I am trying to get the call trace of a process by tracing the return addresses on the stack. To get the correct location of the return address I need to know whether the kernel is being compiled with frame pointer because this will affect the offset of return address on the stack. Regards,

Re: kernel compiled with frame pointer

2000-09-24 Thread Sushil
Hi Keith, Thanks for the useful information. What about CONFIG_KDB_FRAMEPTR? Is it correct to use this in a standard kernel to find whether the kernel is being compiled with frame pointer? I don't know which kernel you are looking at. CONFIG_KDB_FRAMEPTR is part of an old kdb patch,

Re: kernel compiled with frame pointer

2000-09-23 Thread Keith Owens
On Sat, 23 Sep 2000 15:02:26 +0530 (IST), Sushil <[EMAIL PROTECTED]> wrote: >While writing kernel code what is the correct way to find out if the >kernel is being compiled with frame pointer? Sad to say, you cannot. This is an extract from the kdb patch

Re: kernel compiled with frame pointer

2000-09-23 Thread Russell King
Sushil writes: > #ifdef CONFIG_FRAME_POINTER > code assuming frame pointer > #else > code assuming no frame pointer You want #endif here. > Is CONFIG_FRAME_POINTER a part of some external patch? I think you've been looking at some of the ARM code. Yes, we do manipulate the

kernel compiled with frame pointer

2000-09-23 Thread Sushil
Hi, While writing kernel code what is the correct way to find out if the kernel is being compiled with frame pointer? Is the following code correct? #ifdef CONFIG_FRAME_POINTER code assuming frame pointer #else code assuming no frame pointer The top level Makefile that

kernel compiled with frame pointer

2000-09-23 Thread Sushil
Hi, While writing kernel code what is the correct way to find out if the kernel is being compiled with frame pointer? Is the following code correct? #ifdef CONFIG_FRAME_POINTER code assuming frame pointer #else code assuming no frame pointer The top level Makefile that

Re: kernel compiled with frame pointer

2000-09-23 Thread Russell King
Sushil writes: #ifdef CONFIG_FRAME_POINTER code assuming frame pointer #else code assuming no frame pointer You want #endif here. Is CONFIG_FRAME_POINTER a part of some external patch? I think you've been looking at some of the ARM code. Yes, we do manipulate the CFLAGS

Re: kernel compiled with frame pointer

2000-09-23 Thread Keith Owens
On Sat, 23 Sep 2000 15:02:26 +0530 (IST), Sushil [EMAIL PROTECTED] wrote: While writing kernel code what is the correct way to find out if the kernel is being compiled with frame pointer? Sad to say, you cannot. This is an extract from the kdb patch