Merge branch 'master' of bitbucket.org:mashtizadeh/castor
This commit is contained in:
commit
3e38a6340f
@ -48,12 +48,12 @@ Debug_ResumeCPUs()
|
||||
}
|
||||
|
||||
void
|
||||
Debug_HaltIPI()
|
||||
Debug_HaltIPI(TrapFrame *tf)
|
||||
{
|
||||
MP_SetState(CPUSTATE_HALTED);
|
||||
__sync_fetch_and_add(&debugHalted, 1);
|
||||
|
||||
enable_interrupts();
|
||||
frames[CPU()] = tf;
|
||||
|
||||
while (debugCmd == 0) {
|
||||
pause();
|
||||
@ -89,6 +89,15 @@ Debug_Registers(int argc, const char *argv[])
|
||||
{
|
||||
TrapFrame *tf = frames[CPU()];
|
||||
|
||||
if (argc == 2) {
|
||||
int cpuNo = Debug_StrToInt(argv[1]);
|
||||
if (cpuNo >= MAX_CPUS) {
|
||||
kprintf("Invalid CPU number\n");
|
||||
return;
|
||||
}
|
||||
tf = frames[cpuNo];
|
||||
}
|
||||
|
||||
kprintf("Interrupt %d Error Code: %016llx\n",
|
||||
tf->vector, tf->errcode);
|
||||
kprintf("cr0: %016llx cr2: %016llx\n",
|
||||
@ -122,8 +131,20 @@ Debug_Backtrace(int argc, const char *argv[])
|
||||
{
|
||||
TrapFrame *tf = frames[CPU()];
|
||||
uint64_t *ptr;
|
||||
uint64_t rip = tf->rip;
|
||||
uint64_t rbp = tf->rbp;
|
||||
uint64_t rip;
|
||||
uint64_t rbp;
|
||||
|
||||
if (argc == 2) {
|
||||
int cpuNo = Debug_StrToInt(argv[1]);
|
||||
if (cpuNo >= MAX_CPUS) {
|
||||
kprintf("Invalid CPU number\n");
|
||||
return;
|
||||
}
|
||||
tf = frames[cpuNo];
|
||||
}
|
||||
|
||||
rip = tf->rip;
|
||||
rbp = tf->rbp;
|
||||
|
||||
kprintf("%-16s %-16s\n", "IP Pointer", "Base Pointer");
|
||||
while (3) {
|
||||
|
@ -186,7 +186,8 @@ trap_entry(TrapFrame *tf)
|
||||
if (tf->vector <= T_CPU_LAST)
|
||||
{
|
||||
Critical_Enter();
|
||||
kprintf("Kernel Fault!\n");
|
||||
kprintf("Kernel Fault: Vector %d\n", tf->vector);
|
||||
Trap_Dump(tf);
|
||||
Debug_Breakpoint(tf);
|
||||
while (1)
|
||||
hlt();
|
||||
|
Loading…
Reference in New Issue
Block a user