Fix identifying iframes in stack_traces. What you get copying ppc code without trying to understand :)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28007 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
François Revol
2008-10-12 21:23:04 +00:00
parent d6aa728ab5
commit c87d34624e
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -194,7 +194,7 @@ return 0;
// see if the frame pointer matches the iframe
struct iframe *frame = NULL;
for (i = 0; i < frameStack->index; i++) {
if (framePointer == (((addr_t)frameStack->frames[i] - 8) & ~0xf)) {
if (framePointer == (addr_t)frameStack->frames[i]) {
// it's an iframe
frame = frameStack->frames[i];
break;
@@ -324,7 +324,7 @@ arch_debug_get_stack_trace(addr_t* returnAddresses, int32 maxCount,
// see if the frame pointer matches the iframe
struct iframe *frame = NULL;
for (i = 0; i < frameStack->index; i++) {
if (framePointer == (((addr_t)frameStack->frames[i] - 8) & ~0xf)) {
if (framePointer == (addr_t)frameStack->frames[i]) {
// it's an iframe
frame = frameStack->frames[i];
break;
@@ -108,6 +108,7 @@ null_sav_1:
sub.l #IFRAME_fpu-IFRAME_fp,%sp
null_sav_2:
move.l %sp,%fp /* have stack_trace() find the iframe */
move.l %sp,-(%sp) /* push address of iframe */
bsr m68k_exception_entry /* call C entry */
add.l #4,%sp