diff options
Diffstat (limited to 'src/arch/arm')
-rw-r--r-- | src/arch/arm/remote_gdb.cc | 43 | ||||
-rw-r--r-- | src/arch/arm/remote_gdb.hh | 22 |
2 files changed, 8 insertions, 57 deletions
diff --git a/src/arch/arm/remote_gdb.cc b/src/arch/arm/remote_gdb.cc index fce060311..1686cab39 100644 --- a/src/arch/arm/remote_gdb.cc +++ b/src/arch/arm/remote_gdb.cc @@ -161,8 +161,7 @@ using namespace std; using namespace ArmISA; RemoteGDB::RemoteGDB(System *_system, ThreadContext *tc) - : BaseRemoteGDB(_system, tc, GDB_REG_BYTES), - notTakenBkpt(0), takenBkpt(0) + : BaseRemoteGDB(_system, tc, GDB_REG_BYTES) { } @@ -314,46 +313,6 @@ RemoteGDB::setregs() } } -void -RemoteGDB::clearSingleStep() -{ - DPRINTF(GDBMisc, "clearSingleStep bt_addr=%#x nt_addr=%#x\n", - takenBkpt, notTakenBkpt); - - if (takenBkpt != 0) - clearTempBreakpoint(takenBkpt); - - if (notTakenBkpt != 0) - clearTempBreakpoint(notTakenBkpt); -} - -void -RemoteGDB::setSingleStep() -{ - PCState pc = context->pcState(); - PCState bpc; - bool set_bt = false; - - // User was stopped at pc, e.g. the instruction at pc was not - // executed. - MachInst inst = read<MachInst>(pc.pc()); - StaticInstPtr si = context->getDecoderPtr()->decode(inst, pc.pc()); - if (si->hasBranchTarget(pc, context, bpc)) { - // Don't bother setting a breakpoint on the taken branch if it - // is the same as the next pc - if (bpc.pc() != pc.npc()) - set_bt = true; - } - - DPRINTF(GDBMisc, "setSingleStep bt_addr=%#x nt_addr=%#x\n", - takenBkpt, notTakenBkpt); - - setTempBreakpoint(notTakenBkpt = pc.npc()); - - if (set_bt) - setTempBreakpoint(takenBkpt = bpc.pc()); -} - // Write bytes to kernel address space for debugger. bool RemoteGDB::write(Addr vaddr, size_t size, const char *data) diff --git a/src/arch/arm/remote_gdb.hh b/src/arch/arm/remote_gdb.hh index 423ba9d02..80a0bf1b1 100644 --- a/src/arch/arm/remote_gdb.hh +++ b/src/arch/arm/remote_gdb.hh @@ -80,23 +80,15 @@ const int GDB_REG_BYTES = std::max(GDB64_NUMREGS * sizeof(uint64_t), class RemoteGDB : public BaseRemoteGDB { + protected: + bool acc(Addr addr, size_t len); + bool write(Addr addr, size_t size, const char *data); -protected: - Addr notTakenBkpt; - Addr takenBkpt; + void getregs(); + void setregs(); -protected: - bool acc(Addr addr, size_t len); - bool write(Addr addr, size_t size, const char *data); - - void getregs(); - void setregs(); - - void clearSingleStep(); - void setSingleStep(); - -public: - RemoteGDB(System *_system, ThreadContext *tc); + public: + RemoteGDB(System *_system, ThreadContext *tc); }; } // namespace ArmISA |