Re: kernel compiled with frame pointer

From: Keith Owens (kaos@ocs.com.au)
Date: Mon Sep 25 2000 - 03:54:12 EST


On Mon, 25 Sep 2000 01:11:08 +0530 (IST),
Sushil <sushil@veritas.com> 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 -fomit-frame-pointer because
>this will affect the location of return address to it on the stack.

If the caller is not in the same source as the callee then there is no
way of telling if the caller was compiled with frame pointers or not.
I came to the conclusion that relying on frame pointers for backtrace
on ix86 was not realistic, there were too many places where the frame
pointers were not reliable, even if the kernel was compiled with frame
pointers.

I suggest you have a look at the latest kdb patch and all the effort it
has to go through to get a decent backtrace. It is *ugly* but it
works.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Sep 30 2000 - 21:00:13 EST