diff --git a/src/std/debug.c b/src/std/debug.c index 1bcba909d..afca829a9 100644 --- a/src/std/debug.c +++ b/src/std/debug.c @@ -151,9 +151,15 @@ static void *get_reg( int r ) { struct user_regs_struct *regs = NULL; struct user *user = NULL; switch( r ) { +# ifdef HL_64 case 0: return ®s->rsp; case 1: return ®s->rbp; case 2: return ®s->rip; +# else + case 0: return ®s->esp; + case 1: return ®s->ebp; + case 2: return ®s->eip; +# endif case 3: return ®s->eflags; default: return &user->u_debugreg[r-4]; }