summaryrefslogtreecommitdiffstats
path: root/lldb/utils/test
Commit message (Collapse)AuthorAgeFilesLines
* [Utils] Add back utils directoryJonas Devlieghere2019-07-2310-0/+1636
| | | | | | | Due to a bug my earlier commit removed the whole utils directory: https://reviews.llvm.org/D65123 llvm-svn: 366830
* [Utils] Remove legacy scriptsJonas Devlieghere2019-07-2310-1636/+0
| | | | | | | As pointed out by Nathan in D65155, these scrips don't seem to serve any real need anymore. llvm-svn: 366827
* Python 2/3 compat: StringIOSerge Guelton2019-03-252-2/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D59582 llvm-svn: 356910
* Python 2/3 compatibility: from __future__ import print_functionSerge Guelton2019-03-216-41/+53
| | | | | | Differential Revision: https://reviews.llvm.org/D59580 llvm-svn: 356695
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-067-126/+266
| | | | | | | | | | | | | | | | | | | | | | | *** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
* Fix typos in comment.Johnny Chen2011-08-201-1/+1
| | | | llvm-svn: 138179
* Use os.walk(), available since 2.3, instead of os.path.walk(), removed in 3.0,Johnny Chen2011-08-201-37/+28
| | | | | | to walk the directory tree. Plus, we can concentrate only on leaf nodes, i.e., files. llvm-svn: 138178
* No need to look further if the file is a symbolic link. Look for the real file.Johnny Chen2011-08-201-0/+8
| | | | | | Plus add some comments. llvm-svn: 138159
* Add a Python script to locate each binary file under a root directory which ↵Johnny Chen2011-08-192-18/+148
| | | | | | | | | | | | | | | | matches some pathname pattern and to invoke lldb-disasm.py on the binary file to disassemble its symbols. The number of symbols can be specified by, for example, '-n 10000', to specify 10,000 symbols to disassemble for each module. By default, only 1000 symbols from each module are disassembled. Example: utils/test/run-dis.py -r '/Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.3/Symbols' -p '^/System/Library/.*Frameworks/.*\.framework/[^/]+$' tries to disassemble every public/private frameworks (by default only 1000 symbols are disassembled) under iOS4.3. llvm-svn: 138078
* Fix TypeError exception for re.compile().Johnny Chen2011-08-191-1/+2
| | | | llvm-svn: 138045
* Add an option (-p regexp-pattern) to specify the regular expression symbol ↵Johnny Chen2011-08-181-9/+28
| | | | | | | | | | | | pattern we're interested in disassembling. An example: utils/test/lldb-disasm.py -C "platform select remote-ios" -o "-b -n" -e '~/CoreFoundation' -n 20 -p '-\[NSArray .+\]' disassembles the first 20 NSArray instance methods found in the CoreFoundation module. llvm-svn: 138002
* Add an option '-q' to have quiet disassembly by not printing out the ↵Johnny Chen2011-08-181-11/+22
| | | | | | | | | | | | disassembled result. This could be useful by reducing the strain on standard output. Example: utils/test/lldb-disasm.py -C "platform select remote-ios" -o "-b -n" -e '~/CoreFoundation' -n 50 -q llvm-svn: 137988
* Turn off printing of command sent to the pexpect-spawned child process to ↵Johnny Chen2011-06-011-2/+2
| | | | | | make the script more robotic. llvm-svn: 132441
* Make 'run-until-faulted.py' script more interesting by modifying the example ↵Johnny Chen2011-06-012-14/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | main.c program to seg fault randomly instead of deterministically. Example: [15:10:43] johnny:/Volumes/data/lldb/svn/trunk/utils/test $ clang -g main.c [15:10:46] johnny:/Volumes/data/lldb/svn/trunk/utils/test $ ./run-until-faulted.py -l $PWD/../../build/Debug/lldb -e a.out lldb command: /Volumes/data/lldb/svn/trunk/utils/test/../../build/Debug/lldb executable: a.out executable options: (lldb) sending 'file a.out' command... file a.out Current executable set to 'a.out' (x86_64). (lldb) sending 'process launch -- ' command... (iteration: 0) process launch -- Process 63630 launched: '/Volumes/data/lldb/svn/trunk/utils/test/a.out' (x86_64) Hello, fault! val=9 Better luck next time! Process 63630 exited with status = 0 (0x00000000) (lldb) sending 'process launch -- ' command... (iteration: 1) process launch -- Process 63633 launched: '/Volumes/data/lldb/svn/trunk/utils/test/a.out' (x86_64) Process 63633 exited with status = 0 (0x00000000) sending 'process launch -- ' command... (iteration: 2) Hello, fault! val=0 Better luck next time! (lldb) process launch -- Process 63637 launched: '/Volumes/data/lldb/svn/trunk/utils/test/a.out' (x86_64) Hello, fault! val=15 Better luck next time! Process 63637 exited with status = 0 (0x00000000) (lldb) sending 'process launch -- ' command... (iteration: 3) process launch -- Process 63640 launched: '/Volumes/data/lldb/svn/trunk/utils/test/a.out' (x86_64) Hello, fault! val=2 Better luck next time! Process 63640 exited with status = 0 (0x00000000) sending 'process launch -- ' command... (iteration: 4) (lldb) process launch -- Process 63643 launched: '/Volumes/data/lldb/svn/trunk/utils/test/a.out' (x86_64) Process 63643 stopped * thread #1: tid = 0x2d03, 0x0000000100000e93 a.out`main + 99 at main.c:11, stop reason = EXC_BAD_ACCESS (code=1, address=0x0) frame #0: 0x0000000100000e93 a.out`main + 99 at main.c:11 8 u_int32_t val = (arc4random() & 0x0f); 9 printf("val=%u\n", val); 10 if (val == 0x07) // Lucky 7 :-) -> 11 printf("Now segfault %d\n", *null_ptr); 12 else 13 printf("Better luck next time!\n"); 14 } (lldb) * thread #1: tid = 0x2d03, 0x0000000100000e93 a.out`main + 99 at main.c:11, stop reason = EXC_BAD_ACCESS (code=1, address=0x0) frame #0: 0x0000000100000e93 a.out`main + 99 at main.c:11 8 u_int32_t val = (arc4random() & 0x0f); 9 printf("val=%u\n", val); 10 if (val == 0x07) // Lucky 7 :-) -> 11 printf("Now segfault %d\n", *null_ptr); 12 else 13 printf("Better luck next time!\n"); 14 } Hello, fault! val=7 (lldb) llvm-svn: 132430
* Use built-in truth value testing.Johnny Chen2011-05-251-1/+1
| | | | llvm-svn: 132078
* Add a Python utility to help convert the Mail.app saved 'Raw Message Source' ↵Johnny Chen2011-05-231-5/+5
| | | | | | .eml file to a git-am friendly file. llvm-svn: 131924
* Modified to take advantage of the iteration protocol for our lldb container ↵Johnny Chen2011-04-281-3/+2
| | | | | | objects. llvm-svn: 130457
* Add a Python script which launches a program from within lldb and loop until theJohnny Chen2011-04-023-0/+144
| | | | | | | process stops for some reason. main.c (compiled into a.out) is used as an example in the README-run-until-faulted file. llvm-svn: 128755
* Take advantage of the newly added SBSymbol.GetType() API to check whether weJohnny Chen2011-03-311-61/+12
| | | | | | have a Code symbol and do disassembly on it. llvm-svn: 128604
* Add a generator to iterate through the code symbols for a given target.Johnny Chen2011-03-311-1/+38
| | | | | | To be modified to take advantage of the new SBSymbol API which checks a symbol for its type. llvm-svn: 128601
* Add an option to specify the symbols to disassemble instead of the existing ↵Johnny Chen2011-03-301-23/+36
| | | | | | | | | | | | 'num of symbols to disassemble' option. If both are present, the 'symbols to disassemble' overrides the 'num of symbols to disassemble'. An example usage: $ ./lldb-disasm.py -C 'platform create remote-ios' -e /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/usr/lib/libSystem.B.dylib -o '-r -n' -s vprintf -s acosf_special llvm-svn: 128569
* Add the ability to invoke lldb's disassemble command on the symbols digested ↵Johnny Chen2011-03-291-17/+74
| | | | | | | | | from the 'image dump symtab' command. The number of symbols to disassemble can be specified by the '-n Num' option, or unlimited if not specified. llvm-svn: 128442
* Doc string change.Johnny Chen2011-03-281-1/+1
| | | | llvm-svn: 128429
* Add an initial version of lldb-disasm.py script whose purpose is to iterate ↵Johnny Chen2011-03-282-0/+245
| | | | | | | | | through all the symbols for an executable image and to issue the lldb 'disassemble' command on each symbol. The initial version just dumps the symbol table. llvm-svn: 128428
* Add options to allow for specifying an option string when spawning gdb and ↵Johnny Chen2011-03-212-364/+264
| | | | | | | | | | | for executing command(s) right after starting up gdb. Update the README file to show an example of using these to pass '-arch armv7' to gdb and to execute gdb command to set shared library path substitutions before loading iOS4.3 sdk's /usr/lib/libSystem.B.dylib and disassembling the 'printf' function. llvm-svn: 128040
* Fix a typo in the message string.Johnny Chen2011-03-211-1/+1
| | | | llvm-svn: 128034
* Modify disasm.py to better deal with the objc method name which has ':' in them.Johnny Chen2011-03-192-2/+105
| | | | | | Add a utility similar to disasm.py, but which provides a shell-like environment for invoking llvm-mc. llvm-svn: 127936
* Tidy up the input file given to 'llvm-mc -disassemble' and also append the gdbJohnny Chen2011-03-171-7/+10
| | | | | | assembler code to the memory dump. llvm-svn: 127823
* Add a Python script to take an executable, run gdb to disassemble a function,Johnny Chen2011-03-172-0/+698
| | | | | | | | | | | read the memory contents of the function, and then feed the bytes to the 'llvm-mc -disassemble' command. It uses the pexpect module located under ToT/test/pexpect-2.4 directory to automate the interaction with gdb. This is used initially to test the low level ARM disassembler of llvm. llvm-svn: 127785
* Initial check-in of a Python utility to run the lldb test suite and send theJohnny Chen2010-11-161-0/+176
result including the session logs of test failures/errors as a MIME message. llvm-svn: 119371
OpenPOWER on IntegriCloud