Page 1 of 1

Frame pointer special considerations?

Posted: Tue Oct 04, 2016 10:47 am
by wichtounet
Hi guys,

( I know my question is very vague, but I don't think I understand the issue :( )

Recently I wanted to add some basic stack unwinding to my kernel to ease debugging. I added -fno-omit-frame-pointer. Everything in the kernel seems to run fine and then once the scheduler starts the first user task, I have weird page faults (writing at 0x0 with push whereas the stack pointer seems fine) at the very beginning of programs.

I set the rbp to 0 in the initial context of the switch so that the first push should make the end of the frame pointer list.

I checked the main function in my C library and it contains the prologue for frame pointers. Everything seems in order. It just does not work :s

Is there some special considerations I have to think about when using stack pointers ?

Thanks