diff options
| author | Jim Ingham <jingham@apple.com> | 2011-03-22 01:47:27 +0000 |
|---|---|---|
| committer | Jim Ingham <jingham@apple.com> | 2011-03-22 01:47:27 +0000 |
| commit | 381e25b793e65ff4cb50dc5624e259ab7fe15683 (patch) | |
| tree | 759ac85994cd034e3c60aea1561b2dacab0b1c08 /lldb/source/Target/Target.cpp | |
| parent | b43767aff2a7ed31cf22f00b717d45a51ec29a73 (diff) | |
| download | bcm5719-llvm-381e25b793e65ff4cb50dc5624e259ab7fe15683.tar.gz bcm5719-llvm-381e25b793e65ff4cb50dc5624e259ab7fe15683.zip | |
Tidy up the stop hook printing when only one thread matches, and there is only one hook.
llvm-svn: 128062
Diffstat (limited to 'lldb/source/Target/Target.cpp')
| -rw-r--r-- | lldb/source/Target/Target.cpp | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp index 60f2e2d7d5f..46aa45042e4 100644 --- a/lldb/source/Target/Target.cpp +++ b/lldb/source/Target/Target.cpp @@ -1085,6 +1085,19 @@ Target::RunStopHooks () bool keep_going = true; bool hooks_ran = false; + bool print_hook_header; + bool print_thread_header; + + if (num_exe_ctx == 1) + print_thread_header = false; + else + print_thread_header = true; + + if (m_stop_hooks.size() == 1) + print_hook_header = false; + else + print_hook_header = true; + for (pos = m_stop_hooks.begin(); keep_going && pos != end; pos++) { // result.Clear(); @@ -1102,16 +1115,17 @@ Target::RunStopHooks () { if (!hooks_ran) { - result.AppendMessage("\n** Stop Hooks **\n"); + result.AppendMessage("\n** Stop Hooks **"); hooks_ran = true; } - if (!any_thread_matched) + if (print_hook_header && !any_thread_matched) { result.AppendMessageWithFormat("\n- Hook %d\n", cur_hook_sp->GetID()); any_thread_matched = true; } - result.AppendMessageWithFormat("-- Thread %d\n", exc_ctx_with_reasons[i].thread->GetIndexID()); + if (print_thread_header) + result.AppendMessageWithFormat("-- Thread %d\n", exc_ctx_with_reasons[i].thread->GetIndexID()); bool stop_on_continue = true; bool stop_on_error = true; |

