Another fault handler instance where we have to trick gcc4 not to
optimize our code away. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20450 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -57,6 +57,10 @@ get_next_frame(addr_t ebp, addr_t *_next, addr_t *_eip)
|
|||||||
{
|
{
|
||||||
// set fault handler, so that we can safely access user stacks
|
// set fault handler, so that we can safely access user stacks
|
||||||
thread_get_current_thread()->fault_handler = (addr_t)&&error;
|
thread_get_current_thread()->fault_handler = (addr_t)&&error;
|
||||||
|
// Fake goto to trick the compiler not to optimize the code at the label
|
||||||
|
// away.
|
||||||
|
if (ebp == 0)
|
||||||
|
goto error;
|
||||||
|
|
||||||
*_eip = ((struct stack_frame *)ebp)->return_address;
|
*_eip = ((struct stack_frame *)ebp)->return_address;
|
||||||
*_next = (addr_t)((struct stack_frame *)ebp)->previous;
|
*_next = (addr_t)((struct stack_frame *)ebp)->previous;
|
||||||
|
|||||||
Reference in New Issue
Block a user