summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2013-02-15 02:06:30 +0000
committerJim Ingham <jingham@apple.com>2013-02-15 02:06:30 +0000
commit299c0c1c09ba8661cf58f8b5b11c5f69975645a5 (patch)
tree00cd194ba9b0aca69b3216627b559371f7e5ed93
parent5bc0dd79e148171ab054d134189bb9cb37147fec (diff)
downloadbcm5719-llvm-299c0c1c09ba8661cf58f8b5b11c5f69975645a5.tar.gz
bcm5719-llvm-299c0c1c09ba8661cf58f8b5b11c5f69975645a5.zip
A little cleanup. {Disable/Enable}Breakpoint actually disables/enables BreakpointSites not breakpoints, it is confusing
to have it not named appropriately. Also in StopInfoMachException, we aren't testing for software or not software, just whether the thing is a breakpoint we set. So don't use "software"... llvm-svn: 175241
-rw-r--r--lldb/include/lldb/Target/Process.h4
-rw-r--r--lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp4
-rw-r--r--lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.h4
-rw-r--r--lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp18
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp14
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h4
-rw-r--r--lldb/source/Target/Process.cpp12
-rw-r--r--lldb/source/Target/ThreadPlanStepOverBreakpoint.cpp6
8 files changed, 33 insertions, 33 deletions
diff --git a/lldb/include/lldb/Target/Process.h b/lldb/include/lldb/Target/Process.h
index 3aefd95906e..ea163fb394f 100644
--- a/lldb/include/lldb/Target/Process.h
+++ b/lldb/include/lldb/Target/Process.h
@@ -3110,7 +3110,7 @@ public:
GetSoftwareBreakpointTrapOpcode (BreakpointSite* bp_site);
virtual Error
- EnableBreakpoint (BreakpointSite *bp_site)
+ EnableBreakpointSite (BreakpointSite *bp_site)
{
Error error;
error.SetErrorStringWithFormat("error: %s does not support enabling breakpoints", GetShortPluginName());
@@ -3119,7 +3119,7 @@ public:
virtual Error
- DisableBreakpoint (BreakpointSite *bp_site)
+ DisableBreakpointSite (BreakpointSite *bp_site)
{
Error error;
error.SetErrorStringWithFormat("error: %s does not support disabling breakpoints", GetShortPluginName());
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
index 7d33ccec68a..da1e059460d 100644
--- a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
+++ b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
@@ -593,7 +593,7 @@ ProcessKDP::DoDeallocateMemory (lldb::addr_t addr)
}
Error
-ProcessKDP::EnableBreakpoint (BreakpointSite *bp_site)
+ProcessKDP::EnableBreakpointSite (BreakpointSite *bp_site)
{
if (m_comm.LocalBreakpointsAreSupported ())
{
@@ -616,7 +616,7 @@ ProcessKDP::EnableBreakpoint (BreakpointSite *bp_site)
}
Error
-ProcessKDP::DisableBreakpoint (BreakpointSite *bp_site)
+ProcessKDP::DisableBreakpointSite (BreakpointSite *bp_site)
{
if (m_comm.LocalBreakpointsAreSupported ())
{
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.h b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.h
index bc26f6eea9e..520c62e0e68 100644
--- a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.h
+++ b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.h
@@ -174,10 +174,10 @@ public:
// Process Breakpoints
//----------------------------------------------------------------------
virtual lldb_private::Error
- EnableBreakpoint (lldb_private::BreakpointSite *bp_site);
+ EnableBreakpointSite (lldb_private::BreakpointSite *bp_site);
virtual lldb_private::Error
- DisableBreakpoint (lldb_private::BreakpointSite *bp_site);
+ DisableBreakpointSite (lldb_private::BreakpointSite *bp_site);
//----------------------------------------------------------------------
// Process Watchpoints
diff --git a/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp b/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
index 77bc7116b8a..58b6a4e91e4 100644
--- a/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
+++ b/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
@@ -345,8 +345,8 @@ StopInfoMachException::CreateStopReasonWithMachException
case 6: // EXC_BREAKPOINT
{
- bool is_software_breakpoint = false;
- bool is_trace_if_software_breakpoint_missing = false;
+ bool is_actual_breakpoint = false;
+ bool is_trace_if_actual_breakpoint_missing = false;
switch (cpu)
{
case llvm::Triple::x86:
@@ -375,9 +375,9 @@ StopInfoMachException::CreateStopReasonWithMachException
{
// KDP returns EXC_I386_BPTFLT for trace breakpoints
if (exc_code == 3)
- is_trace_if_software_breakpoint_missing = true;
+ is_trace_if_actual_breakpoint_missing = true;
- is_software_breakpoint = true;
+ is_actual_breakpoint = true;
if (!pc_already_adjusted)
pc_decrement = 1;
}
@@ -385,7 +385,7 @@ StopInfoMachException::CreateStopReasonWithMachException
case llvm::Triple::ppc:
case llvm::Triple::ppc64:
- is_software_breakpoint = exc_code == 1; // EXC_PPC_BREAKPOINT
+ is_actual_breakpoint = exc_code == 1; // EXC_PPC_BREAKPOINT
break;
case llvm::Triple::arm:
@@ -410,8 +410,8 @@ StopInfoMachException::CreateStopReasonWithMachException
}
else if (exc_code == 1) // EXC_ARM_BREAKPOINT
{
- is_software_breakpoint = true;
- is_trace_if_software_breakpoint_missing = true;
+ is_actual_breakpoint = true;
+ is_trace_if_actual_breakpoint_missing = true;
}
break;
@@ -419,7 +419,7 @@ StopInfoMachException::CreateStopReasonWithMachException
break;
}
- if (is_software_breakpoint)
+ if (is_actual_breakpoint)
{
RegisterContextSP reg_ctx_sp (thread.GetRegisterContext());
addr_t pc = reg_ctx_sp->GetPC() - pc_decrement;
@@ -447,7 +447,7 @@ StopInfoMachException::CreateStopReasonWithMachException
}
// Don't call this a trace if we weren't single stepping this thread.
- if (is_trace_if_software_breakpoint_missing && thread.GetTemporaryResumeState() == eStateStepping)
+ if (is_trace_if_actual_breakpoint_missing && thread.GetTemporaryResumeState() == eStateStepping)
{
return StopInfo::CreateStopReasonToTrace (thread);
}
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index 96662f61d24..07f4d7b70c1 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -2172,7 +2172,7 @@ ProcessGDBRemote::PutSTDIN (const char *src, size_t src_len, Error &error)
}
Error
-ProcessGDBRemote::EnableBreakpoint (BreakpointSite *bp_site)
+ProcessGDBRemote::EnableBreakpointSite (BreakpointSite *bp_site)
{
Error error;
assert (bp_site != NULL);
@@ -2181,12 +2181,12 @@ ProcessGDBRemote::EnableBreakpoint (BreakpointSite *bp_site)
user_id_t site_id = bp_site->GetID();
const addr_t addr = bp_site->GetLoadAddress();
if (log)
- log->Printf ("ProcessGDBRemote::EnableBreakpoint (size_id = %" PRIu64 ") address = 0x%" PRIx64, site_id, (uint64_t)addr);
+ log->Printf ("ProcessGDBRemote::EnableBreakpointSite (size_id = %" PRIu64 ") address = 0x%" PRIx64, site_id, (uint64_t)addr);
if (bp_site->IsEnabled())
{
if (log)
- log->Printf ("ProcessGDBRemote::EnableBreakpoint (size_id = %" PRIu64 ") address = 0x%" PRIx64 " -- SUCCESS (already enabled)", site_id, (uint64_t)addr);
+ log->Printf ("ProcessGDBRemote::EnableBreakpointSite (size_id = %" PRIu64 ") address = 0x%" PRIx64 " -- SUCCESS (already enabled)", site_id, (uint64_t)addr);
return error;
}
else
@@ -2224,7 +2224,7 @@ ProcessGDBRemote::EnableBreakpoint (BreakpointSite *bp_site)
if (log)
{
const char *err_string = error.AsCString();
- log->Printf ("ProcessGDBRemote::EnableBreakpoint() error for breakpoint at 0x%8.8" PRIx64 ": %s",
+ log->Printf ("ProcessGDBRemote::EnableBreakpointSite () error for breakpoint at 0x%8.8" PRIx64 ": %s",
bp_site->GetLoadAddress(),
err_string ? err_string : "NULL");
}
@@ -2235,7 +2235,7 @@ ProcessGDBRemote::EnableBreakpoint (BreakpointSite *bp_site)
}
Error
-ProcessGDBRemote::DisableBreakpoint (BreakpointSite *bp_site)
+ProcessGDBRemote::DisableBreakpointSite (BreakpointSite *bp_site)
{
Error error;
assert (bp_site != NULL);
@@ -2243,7 +2243,7 @@ ProcessGDBRemote::DisableBreakpoint (BreakpointSite *bp_site)
user_id_t site_id = bp_site->GetID();
LogSP log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_BREAKPOINTS));
if (log)
- log->Printf ("ProcessGDBRemote::DisableBreakpoint (site_id = %" PRIu64 ") addr = 0x%8.8" PRIx64, site_id, (uint64_t)addr);
+ log->Printf ("ProcessGDBRemote::DisableBreakpointSite (site_id = %" PRIu64 ") addr = 0x%8.8" PRIx64, site_id, (uint64_t)addr);
if (bp_site->IsEnabled())
{
@@ -2272,7 +2272,7 @@ ProcessGDBRemote::DisableBreakpoint (BreakpointSite *bp_site)
else
{
if (log)
- log->Printf ("ProcessGDBRemote::DisableBreakpoint (site_id = %" PRIu64 ") addr = 0x%8.8" PRIx64 " -- SUCCESS (already disabled)", site_id, (uint64_t)addr);
+ log->Printf ("ProcessGDBRemote::DisableBreakpointSite (site_id = %" PRIu64 ") addr = 0x%8.8" PRIx64 " -- SUCCESS (already disabled)", site_id, (uint64_t)addr);
return error;
}
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
index 7684607b7f7..957a84f2909 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
@@ -193,10 +193,10 @@ public:
// Process Breakpoints
//----------------------------------------------------------------------
virtual lldb_private::Error
- EnableBreakpoint (lldb_private::BreakpointSite *bp_site);
+ EnableBreakpointSite (lldb_private::BreakpointSite *bp_site);
virtual lldb_private::Error
- DisableBreakpoint (lldb_private::BreakpointSite *bp_site);
+ DisableBreakpointSite (lldb_private::BreakpointSite *bp_site);
//----------------------------------------------------------------------
// Process Watchpoints
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index d06a184d15a..036da889a1f 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -1948,7 +1948,7 @@ Process::DisableAllBreakpointSites ()
size_t num_sites = m_breakpoint_site_list.GetSize();
for (size_t i = 0; i < num_sites; i++)
{
- DisableBreakpoint (m_breakpoint_site_list.GetByIndex(i).get());
+ DisableBreakpointSite (m_breakpoint_site_list.GetByIndex(i).get());
}
}
@@ -1971,7 +1971,7 @@ Process::DisableBreakpointSiteByID (lldb::user_id_t break_id)
if (bp_site_sp)
{
if (bp_site_sp->IsEnabled())
- error = DisableBreakpoint (bp_site_sp.get());
+ error = DisableBreakpointSite (bp_site_sp.get());
}
else
{
@@ -1989,7 +1989,7 @@ Process::EnableBreakpointSiteByID (lldb::user_id_t break_id)
if (bp_site_sp)
{
if (!bp_site_sp->IsEnabled())
- error = EnableBreakpoint (bp_site_sp.get());
+ error = EnableBreakpointSite (bp_site_sp.get());
}
else
{
@@ -2022,7 +2022,7 @@ Process::CreateBreakpointSite (const BreakpointLocationSP &owner, bool use_hardw
bp_site_sp.reset (new BreakpointSite (&m_breakpoint_site_list, owner, load_addr, use_hardware));
if (bp_site_sp)
{
- if (EnableBreakpoint (bp_site_sp.get()).Success())
+ if (EnableBreakpointSite (bp_site_sp.get()).Success())
{
owner->SetBreakpointSite (bp_site_sp);
return m_breakpoint_site_list.Add (bp_site_sp);
@@ -2041,7 +2041,7 @@ Process::RemoveOwnerFromBreakpointSite (lldb::user_id_t owner_id, lldb::user_id_
uint32_t num_owners = bp_site_sp->RemoveOwner (owner_id, owner_loc_id);
if (num_owners == 0)
{
- DisableBreakpoint(bp_site_sp.get());
+ DisableBreakpointSite (bp_site_sp.get());
m_breakpoint_site_list.RemoveByAddress(bp_site_sp->GetLoadAddress());
}
}
@@ -2175,7 +2175,7 @@ Process::DisableSoftwareBreakpoint (BreakpointSite *bp_site)
addr_t bp_addr = bp_site->GetLoadAddress();
lldb::user_id_t breakID = bp_site->GetID();
if (log)
- log->Printf ("Process::DisableBreakpoint (breakID = %" PRIu64 ") addr = 0x%" PRIx64, breakID, (uint64_t)bp_addr);
+ log->Printf ("Process::DisableSoftwareBreakpoint (breakID = %" PRIu64 ") addr = 0x%" PRIx64, breakID, (uint64_t)bp_addr);
if (bp_site->IsHardware())
{
diff --git a/lldb/source/Target/ThreadPlanStepOverBreakpoint.cpp b/lldb/source/Target/ThreadPlanStepOverBreakpoint.cpp
index da67eae025b..502907c60ca 100644
--- a/lldb/source/Target/ThreadPlanStepOverBreakpoint.cpp
+++ b/lldb/source/Target/ThreadPlanStepOverBreakpoint.cpp
@@ -99,7 +99,7 @@ ThreadPlanStepOverBreakpoint::WillResume (StateType resume_state, bool current_p
{
BreakpointSiteSP bp_site_sp (m_thread.GetProcess()->GetBreakpointSiteList().FindByAddress (m_breakpoint_addr));
if (bp_site_sp && bp_site_sp->IsEnabled())
- m_thread.GetProcess()->DisableBreakpoint (bp_site_sp.get());
+ m_thread.GetProcess()->DisableBreakpointSite (bp_site_sp.get());
}
return true;
}
@@ -109,7 +109,7 @@ ThreadPlanStepOverBreakpoint::WillStop ()
{
BreakpointSiteSP bp_site_sp (m_thread.GetProcess()->GetBreakpointSiteList().FindByAddress (m_breakpoint_addr));
if (bp_site_sp)
- m_thread.GetProcess()->EnableBreakpoint (bp_site_sp.get());
+ m_thread.GetProcess()->EnableBreakpointSite (bp_site_sp.get());
return true;
}
@@ -132,7 +132,7 @@ ThreadPlanStepOverBreakpoint::MischiefManaged ()
// Otherwise, re-enable the breakpoint we were stepping over, and we're done.
BreakpointSiteSP bp_site_sp (m_thread.GetProcess()->GetBreakpointSiteList().FindByAddress (m_breakpoint_addr));
if (bp_site_sp)
- m_thread.GetProcess()->EnableBreakpoint (bp_site_sp.get());
+ m_thread.GetProcess()->EnableBreakpointSite (bp_site_sp.get());
ThreadPlan::MischiefManaged ();
return true;
}
OpenPOWER on IntegriCloud