Allow Python commands to optionally take an SBExecutionContext argument in case they need to handle 'where they want to act' separately from the notion of 'currently-selected entity' that is associated to the debugger. Do this in an (hopefully) non-breaking way by running an argcount check before passing in the new argument. Update the test case to also check for this new feature. www update to follow

llvm-svn: 218834
This commit is contained in:
Enrico Granata
2014-10-01 21:47:29 +00:00
parent ebcf42cdec
commit 06be059ad9
12 changed files with 46 additions and 9 deletions

View File

@@ -40,6 +40,7 @@ class CmdPythonTestCase(TestBase):
self.runCmd('command script delete tell_async', check=False)
self.runCmd('command script delete tell_curr', check=False)
self.runCmd('command script delete bug11569', check=False)
self.runCmd('command script delete takes_exe_ctx', check=False)
# Execute the cleanup function during test case tear down.
self.addTearDownHook(cleanup)
@@ -108,6 +109,9 @@ class CmdPythonTestCase(TestBase):
substrs = ['running async'])
self.expect("tell_curr",
substrs = ['I am running sync'])
# check that the execution context is passed in to commands that ask for it
self.expect("takes_exe_ctx", substrs = ["a.out"])
# Test that a python command can redefine itself
self.expect('command script add -f foobar welcome -h "just some help"')