This has led to many test suite failures because of copy and paste where new test cases were based off of other test cases and the "mydir" variable wasn't updated.
Now you can call your superclasses "compute_mydir()" function with "__file__" as the sole argument and the relative path will be computed for you.
llvm-svn: 196985
Now, the way SWIG wrappers call into Python is through a utility PyCallable object, which overloads operator () to look like a normal function call
Plus, using the SBTypeToSWIGWrapper() family of functions, we can call python functions transparently as if they were plain C functions
Using this new technique should make adding new Python call points easier and quicker
The PyCallable is a generally useful facility, and we might want to consider moving it to a separate layer where other parts of LLDB can use it
llvm-svn: 184608
- make LLDB version number match Clang (and the Debian package)
- use the same revision detection magic that Clang uses to report SVN/Git revisions
- update test case as per above
Example output:
$ lldb -v
lldb version 3.3 (https://dmalea@llvm.org/svn/llvm-project/lldb/trunk revision 176211 clang revision 176208 llvm revision 176208)
ss
This line, and those below, will be ignored--
M source/lldb.cpp
M test/help/TestHelp.py
M source/Makefile
llvm-svn: 176268
- no setting auto completion
- very manual and error prone way of getting/setting variables
- tons of code duplication
- useless instance names for processes, threads
Now settings can easily be defined like option values. The new settings makes use of the "OptionValue" classes so we can re-use the option value code that we use to set settings in command options. No more instances, just "does the right thing".
llvm-svn: 162366
Make 'help arch' return the list of supported architectures.
Add a convenience method StringList::Join(const char *separator) which is called from the help function for 'arch'.
Also add a simple test case.
llvm-svn: 157507
Correctly specify the LLDB_OPT_SET's that the 'shlib' command option belongs to by using a newly added macro like this:
#define LLDB_OPT_NOT_10 ( LLDB_OPT_SET_FROM(1, 10) & ~LLDB_OPT_SET_10 )
rdar://problem/11393864
llvm-svn: 156337
with subcommand 'expression' and 'variable'. The first subcommand is for supplying an expression to
be evaluated into an address to watch for, while the second is for watching a variable.
'watchpoint set expression' is a raw command, which means that you need to use the "--" option terminator
to end the '-w' or '-x' option processing and to start typing your expression.
Also update several test cases to comply and add a couple of test cases into TestCompletion.py,
in particular, test that 'watchpoint set ex' completes to 'watchpoint set expression ' and that
'watchpoint set var' completes to 'watchpoint set variable '.
llvm-svn: 150109
the '-e' option (for watching of an address) to be present.
Update some existing test cases with the required option and add some more test cases.
Since the '-v' option takes <variable-name> and the '-e' option takes <expr> as the command arg,
the existing infrastructure for generating the option usage can produce confusing help message,
like:
watchpoint set -e [-w <watch-type>] [-x <byte-size>] <variable-name | expr>
watchpoint set -v [-w <watch-type>] [-x <byte-size>] <variable-name | expr>
The solution adopted is to provide an extra member field to the struct CommandArgumentData called
(uint32_t)arg_opt_set_association, whose purpose is to link this particular argument data with some
option set(s). Also modify the signature of CommandObject::GetFormattedCommandArguments() to:
GetFormattedCommandArguments (Stream &str, uint32_t opt_set_mask = LLDB_OPT_SET_ALL)
it now takes an additional opt_set_mask which can be used to generate a filtered formatted command
args for help message.
Options::GenerateOptionUsage() impl is modified to call the GetFormattedCommandArguments() appropriately.
So that the help message now looks like:
watchpoint set -e [-w <watch-type>] [-x <byte-size>] <expr>
watchpoint set -v [-w <watch-type>] [-x <byte-size>] <variable-name>
rdar://problem/10703256
llvm-svn: 150032
--show-aliases (-a) shows aliases for commands, as well as built-in commands
--hide-user-defined (-u) hides user defined commands
by default 'help' without arguments does not show aliases anymore. to see them, add --show-aliases
to have only built-in commands appear, use 'help --hide-user-defined' ; there is currently no way to hide
built-in commands from the help output
'help command' is not changed by this commit, and help is shown even if command is an alias and -a is not specified
llvm-svn: 139377
The reasom of the crash is because of a missing entry in the argument table corresponding to eArgTypeUnsignedInteger.
Add such entry and modify the call site of the crash to go through a fail-fast API to retrieve the argument table.
Add a regression test to TestHelp.py.
llvm-svn: 135206
Update the expected match string.
o lldbtest.py:
Indicate when a command fails, even if there is nothing in the error stream.
o TestHelp.py:
Add a regression test case for 'help image dump symtab'.
o CommandObjectHelp.cpp:
Some of the logic branches with successful help command results were not tagged
with a Success Status. They are fixed now. This is important for Python
interaction.
llvm-svn: 116062
cleanup before finish into the test fixture in lldbtest.TestBase.tearDown().
Derivatives of TestBase is responsible for setting self.runStarted to True if an
inferior process has been started.
llvm-svn: 111188
backported to Python 2.3+. Some of the features desired include better
verbose reporting in unittest2.TextTestRunner and decorator support for
skipping tests and expected failures.
http://pypi.python.org/pypi/unittest2
o Modified the existing .py tests to use unittest2 and decorated
TestSTL.test_step_into_stl(), which is known to always fail currently, with
@unittest2.expectedFailure.
llvm-svn: 110397
module lldbtest.py and refactored the existing test cases to derive from the
abstract base class lldbtest.TestBase.
MOdified the test driver (dotest.py and dotest.pl) to set up additional
PYTHONPATH component for locating the lldbtest module, which sits in the same
directory.
llvm-svn: 107563
is defined. Use ${LLDB_LOG} to specify the log file.
Create a singleton SBDebugger in the lldb namespace, that gets used when running
the entire test suite.
llvm-svn: 107445
Also modified dotest.py so that it sets the LLDB_TEST environment variable
so that individual test cases can locate their supporting files correctly.
llvm-svn: 107220