diff options
author | Enrico Granata <granata.enrico@gmail.com> | 2011-11-07 22:57:04 +0000 |
---|---|---|
committer | Enrico Granata <granata.enrico@gmail.com> | 2011-11-07 22:57:04 +0000 |
commit | 0a305db796fcd8b0cb6e3f7918de24f0753e2708 (patch) | |
tree | b004601a03a562bdd4be760ac8871bc848365315 /lldb/test/functionalities/command_script/mysto.py | |
parent | 55a86d32d381a077f7a7356182cae1cdb4dd44df (diff) | |
download | bcm5719-llvm-0a305db796fcd8b0cb6e3f7918de24f0753e2708.tar.gz bcm5719-llvm-0a305db796fcd8b0cb6e3f7918de24f0753e2708.zip |
this patch addresses several issues with "command script" subcommands:
a) adds a new --synchronicity (-s) setting for "command script add" that allows the user to decide if scripted commands should run synchronously or asynchronously (which can make a difference in how events are handled)
b) clears up several error messages
c) adds a new --allow-reload (-r) setting for "command script import" that allows the user to reload a module even if it has already been imported before
d) allows filename completion for "command script import" (much like what happens for "target create")
e) prevents "command script add" from replacing built-in commands with scripted commands
f) changes AddUserCommand() to take an std::string instead of a const char* (for performance reasons)
plus, it fixes an issue in "type summary add" command handling which caused several test suite errors
llvm-svn: 144035
Diffstat (limited to 'lldb/test/functionalities/command_script/mysto.py')
-rw-r--r-- | lldb/test/functionalities/command_script/mysto.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lldb/test/functionalities/command_script/mysto.py b/lldb/test/functionalities/command_script/mysto.py new file mode 100644 index 00000000000..4ad3d425592 --- /dev/null +++ b/lldb/test/functionalities/command_script/mysto.py @@ -0,0 +1,21 @@ +import lldb +import sys +import os +import time + +def StepOver(debugger, args, result, dict): + """ + Step over a given number of times instead of only just once + """ + arg_split = args.split(" ") + print type(arg_split) + count = int(arg_split[0]) + for i in range(0,count): + lldb.thread.StepOver(lldb.eOnlyThisThread) + print "step<%d>"%i + +def __lldb_init_module(debugger, session_dict): + # by default, --synchronicity is set to synchronous + debugger.HandleCommand("command script add -f mysto.StepOver mysto") + return None + |