summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/Process.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2013-10-11 19:48:25 +0000
committerGreg Clayton <gclayton@apple.com>2013-10-11 19:48:25 +0000
commiteb023e75dc9d0bbc0d88ba1379e449570b8678fa (patch)
tree08065fe5bdc77f6e8a657a579c3481c428d0393f /lldb/source/Target/Process.cpp
parent877615ccfdaadc154420dcc5a2939c56bf5fa4aa (diff)
downloadbcm5719-llvm-eb023e75dc9d0bbc0d88ba1379e449570b8678fa.tar.gz
bcm5719-llvm-eb023e75dc9d0bbc0d88ba1379e449570b8678fa.zip
<rdar://problem/13635174>
Added a way to set hardware breakpoints from the "breakpoint set" command with the new "--hardware" option. Hardware breakpoints are not a request, they currently are a requirement. So when breakpoints are specified as hardware breakpoints, they might fail to be set when they are able to be resolved and should be used sparingly. This is currently hooked up for GDB remote debugging. Linux and FreeBSD should quickly enable this feature if possible, or return an error for any breakpoints that are hardware breakpoint sites in the "virtual Error Process::EnableBreakpointSite (BreakpointSite *bp_site);" function. llvm-svn: 192491
Diffstat (limited to 'lldb/source/Target/Process.cpp')
-rw-r--r--lldb/source/Target/Process.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index 93159fcae99..45d177642d0 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -2094,11 +2094,21 @@ 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 (EnableBreakpointSite (bp_site_sp.get()).Success())
+ Error error = EnableBreakpointSite (bp_site_sp.get());
+ if (error.Success())
{
owner->SetBreakpointSite (bp_site_sp);
return m_breakpoint_site_list.Add (bp_site_sp);
}
+ else
+ {
+ // Report error for setting breakpoint...
+ m_target.GetDebugger().GetErrorFile().Printf ("warning: failed to set breakpoint site at 0x%" PRIx64 " for breakpoint %i.%i: %s\n",
+ load_addr,
+ owner->GetBreakpoint().GetID(),
+ owner->GetID(),
+ error.AsCString() ? error.AsCString() : "unkown error");
+ }
}
}
}
OpenPOWER on IntegriCloud