llvm-project/lldb/examples/python
Greg Clayton de01668b14 Added a BSD archive tool.
This is a combination stand alone BSD archive tool that can dump BSD archives:

% bsd.py /path/to/foo.a

Search archives for an object file:

% bsd.py --object foo.o bar.a

Dump the symbol definitions found in the __.SYMDEF objects:

% bsd.py --symdef bar.a

Find symbols by name that are listed in the __.SYMDEF objects:

% bsd.py --symbol _Z123 bar.a

Extract objects from BSD archives:

% bsd.py --object foo.o bar.a --extract
% bsd.py --object foo.o bar.a --extract --outfile /tmp/foo.o
% bsd.py --object foo.o bar.a --extract --mtime 0x1234556

It also has installs a new LLDB command line command when imported into LLDB:

(lldb) command script import ~/Dropbox/bin/bsd.py
The "verify-debug-map-objects" command has been installed, type "help verify-debug-map-objects" for detailed help.
(lldb) verify-debug-map-objects a.out

This will iterate through all object files and verify the modification times match for any .o files, it will verify any .o files from BSD archives are found and have matching modification times and print out errors if any are found.

llvm-svn: 328990
2018-04-02 17:20:21 +00:00
..
bsd.py Added a BSD archive tool. 2018-04-02 17:20:21 +00:00
cmdtemplate.py Modernize the example cmdtemplate.py. 2017-10-31 22:38:24 +00:00
crashlog.py The save_crashlog command was still looking at lldb.target and 2017-10-12 02:21:41 +00:00
delta.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
diagnose_nsstring.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
diagnose_unwind.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
dict_utils.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
disasm-stress-test.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
disasm.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
disassembly_mode.py Add an example command to toggle between disassembly-only and source mode. 2017-04-20 21:51:27 +00:00
file_extract.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
gdb_disassemble.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
gdbremote.py Fixed to disassemble new packets and fixed the dumping of the 'x' packets. 2017-04-14 17:05:21 +00:00
globals.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
jump.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
lldb_module_utils.py Fixed up to use a class for the commands, renamed the commands and added a way to just dump the compile unit full paths and optionally their support files with the new "dump-files"command. 2017-11-16 17:14:48 +00:00
lldbtk.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
mach_o.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
memory.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
operating_system.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
performance.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
process_events.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
pytracer.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
sbvalue.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
scripted_step.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
shadow.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
sources.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
stacks.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
step_and_print.py Another silly little thing you can do with Python commands. 2017-10-05 00:49:49 +00:00
symbolication.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
types.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
x86_64_linux_target_definition.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
x86_64_qemu_target_definition.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
x86_64_target_definition.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00