From 4a8a0a07982b7896127d0cb723fde08b3825bb48 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Fri, 5 Dec 2014 22:37:03 -0800 Subject: misc: Generalize GDB single stepping. The new single stepping implementation for x86 doesn't rely on any ISA specific properties or functionality. This change pulls out the per ISA implementation of those functions and promotes the X86 implementation to the base class. One drawback of that implementation is that the CPU might stop on an instruction twice if it's affected by both breakpoints and single stepping. While that might be a little surprising, it's harmless and would only happen under somewhat unlikely circumstances. --- src/arch/sparc/remote_gdb.cc | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'src/arch/sparc/remote_gdb.cc') diff --git a/src/arch/sparc/remote_gdb.cc b/src/arch/sparc/remote_gdb.cc index 778c20731..e654741b6 100644 --- a/src/arch/sparc/remote_gdb.cc +++ b/src/arch/sparc/remote_gdb.cc @@ -144,7 +144,7 @@ using namespace std; using namespace SparcISA; RemoteGDB::RemoteGDB(System *_system, ThreadContext *c) - : BaseRemoteGDB(_system, c, NumGDBRegs * sizeof(uint64_t)), nextBkpt(0) + : BaseRemoteGDB(_system, c, NumGDBRegs * sizeof(uint64_t)) {} /////////////////////////////////////////////////////////// @@ -241,17 +241,3 @@ RemoteGDB::setregs() context->setIntReg(x - RegG0, gdbregs.regs64[x]); // Only the integer registers, pc and npc are set in netbsd } - -void -RemoteGDB::clearSingleStep() -{ - if (nextBkpt) - clearTempBreakpoint(nextBkpt); -} - -void -RemoteGDB::setSingleStep() -{ - nextBkpt = context->pcState().npc(); - setTempBreakpoint(nextBkpt); -} -- cgit v1.2.3