summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrans Kaashoek <[email protected]>2018-10-03 18:13:51 -0400
committerFrans Kaashoek <[email protected]>2018-10-03 18:13:51 -0400
commiteb72653bd7a1dec89a79af3c377c3abf8df2064a (patch)
tree007d7be05f735de83c47d8ba9cfe66d563c63914
parent23a58370a4fa441fd0ee152a3e1e7619e5d8bd6b (diff)
downloadxv6-labs-eb72653bd7a1dec89a79af3c377c3abf8df2064a.tar.gz
xv6-labs-eb72653bd7a1dec89a79af3c377c3abf8df2064a.tar.bz2
xv6-labs-eb72653bd7a1dec89a79af3c377c3abf8df2064a.zip
use x86-64 names
-rw-r--r--proc.c4
-rw-r--r--proc.h4
-rw-r--r--trap.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/proc.c b/proc.c
index 3ab23f4..4d0faec 100644
--- a/proc.c
+++ b/proc.c
@@ -118,7 +118,7 @@ found:
sp -= sizeof *p->context;
p->context = (struct context*)sp;
memset(p->context, 0, sizeof *p->context);
- p->context->eip = (uint64)forkret;
+ p->context->rip = (uint64)forkret;
return p;
}
@@ -531,7 +531,7 @@ procdump(void)
state = "???";
cprintf("%d %s %s", p->pid, state, p->name);
if(p->state == SLEEPING){
- getcallerpcs((uint64*)p->context->ebp+2, pc);
+ getcallerpcs((uint64*)p->context->rbp+2, pc);
for(i=0; i<10 && pc[i] != 0; i++)
cprintf(" %p", pc[i]);
}
diff --git a/proc.h b/proc.h
index 5ab2de5..e421e44 100644
--- a/proc.h
+++ b/proc.h
@@ -33,8 +33,8 @@ struct context {
uint64 r12;
uint64 r11;
uint64 rbx;
- uint64 ebp; //rbp
- uint64 eip; //rip;
+ uint64 rbp;
+ uint64 rip;
};
enum procstate { UNUSED, EMBRYO, SLEEPING, RUNNABLE, RUNNING, ZOMBIE };
diff --git a/trap.c b/trap.c
index f27b99b..c6c6bc2 100644
--- a/trap.c
+++ b/trap.c
@@ -87,13 +87,13 @@ trap(struct trapframe *tf)
default:
if(myproc() == 0 || (tf->cs&3) == 0){
// In kernel, it must be our mistake.
- cprintf("unexpected trap %d from cpu %d eip %x (cr2=0x%x)\n",
+ cprintf("unexpected trap %d from cpu %d rip %x (cr2=0x%x)\n",
tf->trapno, cpuid(), tf->rip, rcr2());
panic("trap");
}
// In user space, assume process misbehaved.
cprintf("pid %d %s: trap %d err %d on cpu %d "
- "eip 0x%x addr 0x%x--kill proc\n",
+ "rip 0x%x addr 0x%x--kill proc\n",
myproc()->pid, myproc()->name, tf->trapno,
tf->err, cpuid(), tf->rip, rcr2());
myproc()->killed = 1;