summaryrefslogtreecommitdiffstats
path: root/lldb/test/functionalities/command_script/welcome.py
Commit message (Collapse)AuthorAgeFilesLines
* Move lldb/test to lldb/packages/Python/lldbsuite/test.Zachary Turner2015-10-281-46/+0
| | | | | | | | | | | This is the conclusion of an effort to get LLDB's Python code structured into a bona-fide Python package. This has a number of benefits, but most notably the ability to more easily share Python code between different but related pieces of LLDB's Python infrastructure (for example, `scripts` can now share code with `test`). llvm-svn: 251532
* Add from __future__ import print_function everywhere.Zachary Turner2015-10-231-8/+9
| | | | | | | | | | | | | Apparently there were tons of instances I missed last time, I guess I accidentally ran 2to3 non-recursively. This should be every occurrence of a print statement fixed to use a print function as well as from __future__ import print_function being added to every file. After this patch print statements will stop working everywhere in the test suite, and the print function should be used instead. llvm-svn: 251121
* Revert r238425, it undoes the purpose of the testEd Maste2015-05-281-7/+3
| | | | | | llvm.org/pr23686 llvm-svn: 238437
* Fix TestCommandScript: return an error if target executable is not setEd Maste2015-05-281-3/+7
| | | | | | | | | | The test invokes the 'targetname' test command before setting a target executable, which caused Python to raise TypeError: cannot concatenate 'str' and 'NoneType' objects. llvm.org/pr23686 llvm-svn: 238425
* Add support for custom commands to set flags on themselvesEnrico Granata2015-05-271-7/+14
| | | | | | | | | This works for Python commands defined via a class (implement get_flags on your class) and C++ plugin commands (which can call SBCommand::GetFlags()/SetFlags()) Flags allow features such as not letting the command run if there's no target, or if the process is not stopped, ... Commands could always check for these things themselves, but having these accessible via flags makes custom commands more consistent with built-in ones llvm-svn: 238286
* Add support for Python object commands to return custom short and long help ↵Enrico Granata2015-03-131-7/+10
| | | | | | | | | | | | | by implementing def get_short_help(self) def get_long_help(self) methods on the command object Also, add a test case for this feature llvm-svn: 232224
* Allow Python commands to optionally take an SBExecutionContext argument in ↵Enrico Granata2014-10-011-0/+3
| | | | | | 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
* Second attempt at getting the PyCallable changes in trunkEnrico Granata2013-07-091-5/+2
| | | | | | Thanks to Daniel Malea for helping test this patch for Linux happiness! llvm-svn: 185965
* Revert commits that cause broken builds on GCC buildbotsDaniel Malea2013-07-031-2/+5
| | | | | | | | - build fails due to PyCallable template definition inside an extern "C" scope This commit reverts 185240, 184893 and 184608. llvm-svn: 185560
* <rdar://problem/14266411>Enrico Granata2013-06-251-5/+2
| | | | | | | | | | | | The semi-unofficial way of returning a status from a Python command was to return a string (e.g. return "no such variable was found") that LLDB would pick as a clue of an error having happened This checkin changes that: - SBCommandReturnObject now exports a SetError() call, which can take an SBError or a plain C-string - script commands now drop any return value and expect the SBCommandReturnObject ("return object") to be filled in appropriately - if you do nothing, a success will be assumed If your commands were relying on returning a value and having LLDB pick that up as an error, please change your commands to SetError() through the return object or expect changes in behavior llvm-svn: 184893
* Fixing Python commands test cases to work even after removing PrintfEnrico Granata2013-03-301-7/+7
| | | | | | (and using the new syntax for printing :-) llvm-svn: 178389
* <rdar://problem/12446320> Fixing an issue with our Driver where setting an ↵Enrico Granata2012-10-161-2/+3
| | | | | | immediate output would not cause suppression of the final printout. This allows effective output redirection for Python commands llvm-svn: 166058
* this patch addresses several issues with "command script" subcommands:Enrico Granata2011-11-071-1/+8
| | | | | | | | | | | | 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
* Rename directory command_python to command_script, and the test file, too.Johnny Chen2011-10-141-0/+27
llvm-svn: 141963
OpenPOWER on IntegriCloud