[Lldb-commits] [lldb] r142868 - in /lldb/trunk: source/Target/Target.cpp test/functionalities/abbreviation/TestAbbreviations.py
Johnny Chen
johnny.chen at apple.com
Mon Oct 24 16:01:06 PDT 2011
Author: johnny
Date: Mon Oct 24 18:01:06 2011
New Revision: 142868
URL: http://llvm.org/viewvc/llvm-project?rev=142868&view=rev
Log:
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.
Modified:
lldb/trunk/source/Target/Target.cpp
lldb/trunk/test/functionalities/abbreviation/TestAbbreviations.py
Modified: lldb/trunk/source/Target/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Target.cpp?rev=142868&r1=142867&r2=142868&view=diff
==============================================================================
--- lldb/trunk/source/Target/Target.cpp (original)
+++ lldb/trunk/source/Target/Target.cpp Mon Oct 24 18:01:06 2011
@@ -1736,7 +1736,13 @@
}
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;
}
Modified: lldb/trunk/test/functionalities/abbreviation/TestAbbreviations.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/abbreviation/TestAbbreviations.py?rev=142868&r1=142867&r2=142868&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/abbreviation/TestAbbreviations.py (original)
+++ lldb/trunk/test/functionalities/abbreviation/TestAbbreviations.py Mon Oct 24 18:01:06 2011
@@ -151,12 +151,13 @@
self.expect("i d symt",
patterns = ["Dumping symbol table for [0-9]+ modules."])
- self.expect("i li",
- substrs = [ 'a.out',
- '/usr/lib/dyld',
- '/usr/lib/libstdc++',
- '/usr/lib/libSystem.B.dylib',
- '/usr/lib/system/libmathCommon.A.dylib'])
+ if sys.platform.startswith("darwin"):
+ self.expect("i li",
+ substrs = [ 'a.out',
+ '/usr/lib/dyld',
+ '/usr/lib/libstdc++',
+ '/usr/lib/libSystem.B.dylib',
+ '/usr/lib/system/libmathCommon.A.dylib'])
if __name__ == '__main__':
More information about the lldb-commits
mailing list