summaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
Diffstat (limited to 'base')
-rw-r--r--base/remote_gdb.cc24
1 files changed, 12 insertions, 12 deletions
diff --git a/base/remote_gdb.cc b/base/remote_gdb.cc
index 5f1a2db2c..50c4798c4 100644
--- a/base/remote_gdb.cc
+++ b/base/remote_gdb.cc
@@ -429,7 +429,7 @@ RemoteGDB::getregs()
memcpy(&gdbregs[KGDB_REG_F0], context->regs.floatRegFile.q,
32 * sizeof(uint64_t));
#endif
- gdbregs[KGDB_REG_PC] = context->regs.pc;
+ gdbregs[KGDB_REG_PC] = context->readPC();
}
///////////////////////////////////////////////////////////
@@ -447,7 +447,7 @@ RemoteGDB::setregs()
memcpy(context->regs.floatRegFile.q, &gdbregs[KGDB_REG_F0],
32 * sizeof(uint64_t));
#endif
- context->regs.pc = gdbregs[KGDB_REG_PC];
+ context->setPC(gdbregs[KGDB_REG_PC]);
}
void
@@ -486,7 +486,7 @@ RemoteGDB::clearSingleStep()
void
RemoteGDB::setSingleStep()
{
- Addr pc = context->regs.pc;
+ Addr pc = context->readPC();
Addr npc, bpc;
bool set_bt = false;
@@ -835,7 +835,7 @@ RemoteGDB::trap(int type)
return false;
DPRINTF(GDBMisc, "trap: PC=%#x NPC=%#x\n",
- context->regs.pc, context->regs.npc);
+ context->readPC(), context->readNextPC());
clearSingleStep();
@@ -990,8 +990,8 @@ RemoteGDB::trap(int type)
subcmd = hex2i(&p);
if (*p++ == ';') {
val = hex2i(&p);
- context->regs.pc = val;
- context->regs.npc = val + sizeof(MachInst);
+ context->setPC(val);
+ context->setNextPC(val + sizeof(MachInst));
}
clearSingleStep();
goto out;
@@ -999,8 +999,8 @@ RemoteGDB::trap(int type)
case KGDB_CONT:
if (p - data < datalen) {
val = hex2i(&p);
- context->regs.pc = val;
- context->regs.npc = val + sizeof(MachInst);
+ context->setPC(val);
+ context->setNextPC(val + sizeof(MachInst));
}
clearSingleStep();
goto out;
@@ -1009,8 +1009,8 @@ RemoteGDB::trap(int type)
subcmd = hex2i(&p);
if (*p++ == ';') {
val = hex2i(&p);
- context->regs.pc = val;
- context->regs.npc = val + sizeof(MachInst);
+ context->setPC(val);
+ context->setNextPC(val + sizeof(MachInst));
}
setSingleStep();
goto out;
@@ -1018,8 +1018,8 @@ RemoteGDB::trap(int type)
case KGDB_STEP:
if (p - data < datalen) {
val = hex2i(&p);
- context->regs.pc = val;
- context->regs.npc = val + sizeof(MachInst);
+ context->setPC(val);
+ context->setNextPC(val + sizeof(MachInst));
}
setSingleStep();
goto out;