summaryrefslogtreecommitdiffstats
path: root/lldb/examples
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove unnecessary 'import' statement.Johnny Chen2011-07-061-1/+0
| | | | llvm-svn: 134519
* Add source files for Python scripting example (coming soon).Caroline Tice2011-06-022-0/+318
| | | | llvm-svn: 132512
* Add a little spice to the script to allow us to specify a function name to ↵Johnny Chen2011-05-251-3/+20
| | | | | | | | break at and to disassemble. Usage: disasm.py [-n name] executable-image By default, it breaks at and disassembles the 'main' function. llvm-svn: 132090
* Add a little twist to the disasm.py script so that it is possible to ↵Johnny Chen2011-05-251-7/+12
| | | | | | | | terminate the inferior process by entering 'Ctrl-D' or 'quit'. llvm-svn: 132088
* Modified to use SBTarget.LaunchSimple() API.Johnny Chen2011-05-251-2/+1
| | | | llvm-svn: 132082
* Use built-in truth value testing.Johnny Chen2011-05-251-6/+6
| | | | llvm-svn: 132079
* Modified to take advantage of the iteration protocol for our lldb container ↵Johnny Chen2011-04-281-12/+8
| | | | | | objects. llvm-svn: 130456
* The example had gotten stale, so I made it work again, and for fun printed ↵Jim Ingham2011-03-301-2/+16
| | | | | | out the frame registers as well. llvm-svn: 128523
* Spelling changes applied from lldb_spelling.diffs from Bruce Mitchener.Greg Clayton2011-01-081-1/+1
| | | | | | Thanks Bruce! llvm-svn: 123083
* Add comment explaining the options used to invoke the test driver.Johnny Chen2010-10-251-0/+18
| | | | llvm-svn: 117318
* A simple config to test both x86_64 and i386 architectures.Johnny Chen2010-10-251-0/+1
| | | | llvm-svn: 117304
* There's no need to explicitly call lldb.SBDebugger.Initialize() now. It is doneJohnny Chen2010-10-151-3/+0
| | | | | | when importing the lldb module. llvm-svn: 116585
* Added the capability for the test driver to split the sys.stderr/sys.stdout intoJohnny Chen2010-10-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | different configuration-based files using the config file. For example: sys.stderr = open("/tmp/lldbtest-stderr", "w") sys.stdout = open("/tmp/lldbtest-stdout", "w") compilers = ["gcc", "llvm-gcc"] archs = ["x86_64", "i386"] split_stderr = True # This will split the stderr into configuration-specific file split_stdout = True # This will split the stdout into configuration-specific file will produce: /tmp/lldbtest-stderr /tmp/lldbtest-stderr.arch=i386-compiler=gcc /tmp/lldbtest-stderr.arch=i386-compiler=llvm-gcc /tmp/lldbtest-stderr.arch=x86_64-compiler=gcc /tmp/lldbtest-stderr.arch=x86_64-compiler=llvm-gcc /tmp/lldbtest-stdout /tmp/lldbtest-stdout.arch=i386-compiler=gcc /tmp/lldbtest-stdout.arch=i386-compiler=llvm-gcc /tmp/lldbtest-stdout.arch=x86_64-compiler=gcc /tmp/lldbtest-stdout.arch=x86_64-compiler=llvm-gcc as a result of splitting stderr and stdout. In addition, each configuration can have its individual top level relocated directory to house the test files as well as the intermediate files by using '-r dir' to relocate the tests into a new relocated directory instead of running the tests in place. llvm-svn: 116341
* Minor change.Johnny Chen2010-10-091-1/+1
| | | | llvm-svn: 116127
* Cleaned up the SWIG stuff so all includes happen as they should, no pullingGreg Clayton2010-10-071-35/+48
| | | | | | | | | | | | | | | | | | tricks to get types to resolve. I did this by correctly including the correct files: stdint.h and all lldb-*.h files first before including the API files. This allowed me to remove all of the hacks that were in the lldb.swig file and it also allows all of the #defines in lldb-defines.h and enumerations in lldb-enumerations.h to appear in the lldb.py module. This will make the python script code a lot more readable. Cleaned up the "process launch" command to not execute a "process continue" command, it now just does what it should have with the internal API calls instead of executing another command line command. Made the lldb_private::Process set the state to launching and attaching if WillLaunch/WillAttach return no error respectively. llvm-svn: 115902
* Fixed a few issues with the example script.Greg Clayton2010-10-061-2/+2
| | | | llvm-svn: 115801
* Added the first of hopefully many python example scripts that show how toGreg Clayton2010-10-061-0/+79
| | | | | | | | | | use the python API that is exposed through SWIG to do some cool stuff. Also fixed synchronous debugging so that all process control APIs exposed through the python API will now wait for the process to stop if you set the async mode to false (see disasm.py). llvm-svn: 115738
* Added the capability to source the configFile specified via the "-c" option inJohnny Chen2010-09-214-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | order to customize the running of the test suite. For the time being, the supported customizations are: o redirecting stdout and/or stderr o specifying a list of compilers to build the test programs o specifying a list of architectures to build the test programs for Also checked into the examples/test directory some example files which demonstrate the usage for the above customizations. $ ./dotest.py -v -c ~/.lldbtest-config persistent_variables $ cat ~/.lldbtest-config sys.stderr = open("/tmp/lldbtest-stderr", "w") sys.stdout = open("/tmp/lldbtest-stdout", "w") compilers = ["gcc", "llvm-gcc"] archs = ["x86_64", "i386"] $ cat /tmp/lldbtest-stderr ---------------------------------------------------------------------- Collected 1 test Configuration: arch=x86_64 compiler=gcc test_persistent_variables (TestPersistentVariables.PersistentVariablesTestCase) Test that lldb persistent variables works correctly. ... ok ---------------------------------------------------------------------- Ran 1 test in 1.397s OK Configuration: arch=x86_64 compiler=llvm-gcc test_persistent_variables (TestPersistentVariables.PersistentVariablesTestCase) Test that lldb persistent variables works correctly. ... ok ---------------------------------------------------------------------- Ran 1 test in 1.282s OK Configuration: arch=i386 compiler=gcc test_persistent_variables (TestPersistentVariables.PersistentVariablesTestCase) Test that lldb persistent variables works correctly. ... ok ---------------------------------------------------------------------- Ran 1 test in 1.297s OK Configuration: arch=i386 compiler=llvm-gcc test_persistent_variables (TestPersistentVariables.PersistentVariablesTestCase) Test that lldb persistent variables works correctly. ... ok ---------------------------------------------------------------------- Ran 1 test in 1.269s OK $ cat /tmp/lldbtest-stdout $ llvm-svn: 114380
* Added some missing API for address resolving within a module, and lookingGreg Clayton2010-09-101-0/+105
up a seciton offset address (SBAddress) within a module that returns a symbol context (SBSymbolContext). Also added a SBSymbolContextList in preparation for adding find/lookup APIs that can return multiple results. Added a lookup example code that shows how to do address lookups. llvm-svn: 113599
OpenPOWER on IntegriCloud