[lkml]   [2000]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: kernel compiled with frame pointer
On Mon, 25 Sep 2000 06:21:48 -0500, 
Robert Redelmeier <> 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 sometimes [not by gcc AFAIK with `enter`]. Exit points are similarly
>`movl %ebp, %esp / popl %ebp / ret`. Some versions of gcc do generate
>`leave / ret`.
>You could look for these byte signatures. Should be quite reliable with
>a good

Until you go to gcc 2.96 when the prologue code changes dramatically.
Interleaved instructions, plus "nice" constructs like

void foo(int bar)
if (!bar)

Could generate the test before doing anything on stack.

foo: cmpl 4(%esp),$0
be 1f
pushl %ebp
movl %esp,%ebp
movl %ebp,%esp
popl %ebp
1: ret

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:38    [W:0.073 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site