Skip to content

Commit

Permalink
support linux 32bits
Browse files Browse the repository at this point in the history
  • Loading branch information
ncannasse committed Jun 12, 2018
1 parent 1f5a09f commit 2cdc75a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/std/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 &regs->rsp;
case 1: return &regs->rbp;
case 2: return &regs->rip;
# else
case 0: return &regs->esp;
case 1: return &regs->ebp;
case 2: return &regs->eip;
# endif
case 3: return &regs->eflags;
default: return &user->u_debugreg[r-4];
}
Expand Down

0 comments on commit 2cdc75a

Please sign in to comment.