Frame pointer special considerations?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
wichtounet
Member
Member
Posts: 90
Joined: Fri Nov 01, 2013 4:05 pm
Location: Fribourg, Switzerland
Contact:

Frame pointer special considerations?

Post 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
Thor Operating System: C++ 64 bits OS: https://github.com/wichtounet/thor-os
Good osdeving!
Post Reply