diff options
| author | Johnny Chen <johnny.chen@apple.com> | 2011-10-24 23:01:06 +0000 |
|---|---|---|
| committer | Johnny Chen <johnny.chen@apple.com> | 2011-10-24 23:01:06 +0000 |
| commit | aeab25c70fb4defadb281d0d62faa5d1c1772d89 (patch) | |
| tree | bccf8be5cc4fb1740f6564fd5bcdabfe95ea781f /lldb/source/Target/Target.cpp | |
| parent | f33bfbbace7bc561203ef43f5fdcb5a8544979c2 (diff) | |
| download | bcm5719-llvm-aeab25c70fb4defadb281d0d62faa5d1c1772d89.tar.gz bcm5719-llvm-aeab25c70fb4defadb281d0d62faa5d1c1772d89.zip | |
Add more context information to the stop-hook mechanism by displaying the stop-hook
command in the '- Hook id' header. This should improve readbility of the 'display'
command if, for example, we have issued 'display a' and 'display b' which turn into
"target stop-hook add -o 'expr -- a'" and "target stop-hook add -o 'expr -- b'".
Plus some minor change in TestAbbreviations.py to conditionalize the platform-specific
checkings of the "image list" output.
llvm-svn: 142868
Diffstat (limited to 'lldb/source/Target/Target.cpp')
| -rw-r--r-- | lldb/source/Target/Target.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp index a7e87563c9b..359435de46c 100644 --- a/lldb/source/Target/Target.cpp +++ b/lldb/source/Target/Target.cpp @@ -1736,7 +1736,13 @@ Target::RunStopHooks () } if (print_hook_header && !any_thread_matched) { - result.AppendMessageWithFormat("\n- Hook %llu\n", cur_hook_sp->GetID()); + const char *cmd = (cur_hook_sp->GetCommands().GetSize() == 1 ? + cur_hook_sp->GetCommands().GetStringAtIndex(0) : + NULL); + if (cmd) + result.AppendMessageWithFormat("\n- Hook %llu (%s)\n", cur_hook_sp->GetID(), cmd); + else + result.AppendMessageWithFormat("\n- Hook %llu\n", cur_hook_sp->GetID()); any_thread_matched = true; } |

