summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/Process.cpp
diff options
context:
space:
mode:
authorStephen Wilson <wilsons@start.ca>2011-01-12 04:20:03 +0000
committerStephen Wilson <wilsons@start.ca>2011-01-12 04:20:03 +0000
commit78a4feb2c46623343172ca0233f37314aba39d2c (patch)
tree185ae29832a8ade84b49184c9e4154daee526b4a /lldb/source/Target/Process.cpp
parentce7b69c3fc187ce05a698817e58a2f8ee9ffabc1 (diff)
downloadbcm5719-llvm-78a4feb2c46623343172ca0233f37314aba39d2c.tar.gz
bcm5719-llvm-78a4feb2c46623343172ca0233f37314aba39d2c.zip
Log diagnostic when setting software breakpoints only on failure.
Previously we would be posting a "FAILED" message to the log channel even when the operation succeeded. Also, take this opportunity to add braces thus eliminating an "ambiguous else" compiler warning. llvm-svn: 123306
Diffstat (limited to 'lldb/source/Target/Process.cpp')
-rw-r--r--lldb/source/Target/Process.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index 36f21ac56a5..42e0cf7cd89 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -1080,7 +1080,7 @@ Process::EnableSoftwareBreakpoint (BreakpointSite *bp_site)
else
error.SetErrorString("Unable to read memory at breakpoint address.");
}
- if (log)
+ if (log && error.Fail())
log->Printf ("Process::EnableSoftwareBreakpoint (site_id = %d) addr = 0x%llx -- FAILED: %s",
bp_site->GetID(),
(uint64_t)bp_addr,
@@ -2628,13 +2628,14 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx,
// Right now this is the only way to tell we've timed out...
// We should interrupt the process here...
// Not really sure what to do if Halt fails here...
- if (log)
+ if (log) {
if (try_all_threads)
log->Printf ("Running function with timeout: %d timed out, trying with all threads enabled.",
single_thread_timeout_usec);
else
log->Printf ("Running function with timeout: %d timed out, abandoning execution.",
single_thread_timeout_usec);
+ }
if (exe_ctx.process->Halt().Success())
{
OpenPOWER on IntegriCloud