| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When debugging with the GDB remote in LLDB, LLDB uses special packets to discover the
registers on the remote server. When those packets aren't supported, LLDB doesn't
know what the registers look like. This checkin implements a setting that can be used
to specify a python file that contains the registers definitions. The setting is:
(lldb) settings set plugin.process.gdb-remote.target-definition-file /path/to/module.py
Inside module there should be a function:
def get_dynamic_setting(target, setting_name):
This dynamic setting function is handed the "target" which is a SBTarget, and the
"setting_name", which is the name of the dynamic setting to retrieve. For the GDB
remote target definition the setting name is 'gdb-server-target-definition'. The
return value is a dictionary that follows the same format as the OperatingSystem
plugins follow. I have checked in an example file that implements the x86_64 GDB
register set for people to see:
examples/python/x86_64_target_definition.py
This allows LLDB to debug to any archticture that is support and allows users to
define the registers contexts when the discovery packets (qRegisterInfo, qHostInfo)
are not supported by the remote GDB server.
A few benefits of doing this in Python:
1 - The dynamic register context was already supported in the OperatingSystem plug-in
2 - Register contexts can use all of the LLDB enumerations and definitions for things
like lldb::Format, lldb::Encoding, generic register numbers, invalid registers
numbers, etc.
3 - The code that generates the register context can use the program to calculate the
register context contents (like offsets, register numbers, and more)
4 - True dynamic detection could be used where variables and types could be read from
the target program itself in order to determine which registers are available since
the target is passed into the python function.
This is designed to be used instead of XML since it is more dynamic and code flow and
functions can be used to make the dictionary.
llvm-svn: 192646
|
|
|
|
|
|
| |
encoded string represented as a (pointer,length) pair
llvm-svn: 192206
|
|
|
|
|
|
| |
Thanks to Jared Grubb for writing it and sharing it!
llvm-svn: 189964
|
|
|
|
|
|
|
|
| |
files contained in one or more modules.
Added "mach_o.py" which is a mach-o parser that can dump mach-o file contents and also extract sections. It uses the "file_extract" module and the "dict_utils" module.
llvm-svn: 189959
|
|
|
|
|
|
|
|
| |
resolution of class_getSuperclass.
<rdar://problem/14662686>
llvm-svn: 188240
|
|
|
|
| |
llvm-svn: 186358
|
|
|
|
|
|
| |
process allowing a debugger to attach.
llvm-svn: 186194
|
|
|
|
|
|
| |
to search memory for a byte pattern.
llvm-svn: 186127
|
|
|
|
|
|
| |
print style and the (finally available :-) SetError API
llvm-svn: 186122
|
|
|
|
| |
llvm-svn: 185906
|
|
|
|
|
|
|
| |
print five words of memory at the beginning of the stack frame so it's
easier to track where an incorrect saved-fp or saved-pc may have come from.
llvm-svn: 185903
|
|
|
|
|
|
| |
handling.
llvm-svn: 185089
|
|
|
|
| |
llvm-svn: 185028
|
|
|
|
|
|
| |
also use the debugger's listener.
llvm-svn: 185027
|
|
|
|
|
|
| |
match. Also split things up a bit so this can be run as a stand alone script or in lldb.
llvm-svn: 184628
|
|
|
|
| |
llvm-svn: 184487
|
|
|
|
| |
llvm-svn: 184483
|
|
|
|
|
|
| |
the number of types found.
llvm-svn: 184389
|
|
|
|
|
|
| |
The script was able to point out and save 40 bytes in each lldb_private::Section by being very careful where we need to have virtual destructors and also by re-ordering members.
llvm-svn: 184364
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change the simple-minded stack walk to not depend on lldb to unwind
the first frame.
Collect a list of Modules and Addresses seen while backtracing (with
both methods), display the image list output for all of those modules,
plus disassemble and image show-unwind any additional frames that
the simple backtrace was able to unwind through instead of just the
lldb unwind algorithm frames.
Remove checks for older lldb's that didn't support -a for disassemble
or specifying the assembler syntax on x86 targets.
llvm-svn: 184280
|
|
|
|
|
|
|
|
|
| |
- specify the architecture
- specify the platform
- specify if only external symbols should be dumped
- specify if types in the function signatures should be canonicalized
llvm-svn: 183961
|
|
|
|
| |
llvm-svn: 183959
|
|
|
|
|
|
|
|
|
|
|
|
| |
This will enable libc++ support.
Improved the makefile "clean" to include deleting all ".d.[0-9]+" files.
Added options to the "lldb/examples/lookup" example and made it build using the LLDB_BUILD_DIR. If this is not set, it will default to "/Applications/Xcode.app/Contents/SharedFrameworks" on Darwin.
Added options to the "lldb/examples/function" example and made it build using the LLDB_BUILD_DIR.
llvm-svn: 183949
|
|
|
|
|
|
|
|
| |
and it will print out the function name, range, return type and argument types.
This example shows someone could iterate over all functions and do something intelligent with them, like create function signatures. Then two different builds could be compared to verify the API hasn't changed.
llvm-svn: 183923
|
|
|
|
|
|
| |
Print the lldb version at the top of the output.
llvm-svn: 183289
|
|
|
|
|
|
| |
This should help us figure out issues with the NSString data formatter
llvm-svn: 182972
|
|
|
|
|
|
| |
This one actually exploits the SB API to obtain information about your inferior process
llvm-svn: 181500
|
|
|
|
|
|
|
|
| |
to improve the quality of the output when debugging data formatters
(more improvements are necessary before this is really legible)
llvm-svn: 181367
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This module uses Python's sys.settrace() mechanism so setup a hook that can log every significant operation
This is a first step in providing a good debugging experience of Python embedded in LLDB
This module comprises an OO infrastructure that wraps Python's tracing and inspecting mechanisms, plus a very simple logging tracer
Output from this tracer looks like:
call print_keyword_args from <module> @ 243 args are kwargs are {'first_name': 'John', 'last_name': 'Doe'}
running print_keyword_args @ 228 locals are {'kwargs': {'first_name': 'John', 'last_name': 'Doe'}}
running print_keyword_args @ 229 locals are {'key': 'first_name', 'value': 'John', 'kwargs': {'first_name': 'John', 'last_name': 'Doe'}}
first_name = John
running print_keyword_args @ 228 locals are {'key': 'first_name', 'value': 'John', 'kwargs': {'first_name': 'John', 'last_name': 'Doe'}}
running print_keyword_args @ 229 locals are {'key': 'last_name', 'value': 'Doe', 'kwargs': {'first_name': 'John', 'last_name': 'Doe'}}
last_name = Doe
running print_keyword_args @ 228 locals are {'key': 'last_name', 'value': 'Doe', 'kwargs': {'first_name': 'John', 'last_name': 'Doe'}}
return from print_keyword_args value is None locals are {'key': 'last_name', 'value': 'Doe', 'kwargs': {'first_name': 'John', 'last_name': 'Doe'}}
llvm-svn: 181343
|
|
|
|
|
|
| |
out of it.
llvm-svn: 180835
|
|
|
|
|
|
|
| |
terminate the command early if we happen to have an invalid load
address.
llvm-svn: 180826
|
|
|
|
|
|
|
|
|
|
|
| |
finish-swig-Python-LLDB.sh to create a new lldb.diagnose subdirectory
in the LLDB framework; the first diagnostic command in this directory
is diagnose-unwind. There may be others added in the future.
Users can load these diagnostic tools into their session with
"script import lldb.diagnose".
llvm-svn: 180768
|
|
|
|
| |
llvm-svn: 180223
|
|
|
|
| |
llvm-svn: 180086
|
|
|
|
|
|
|
|
|
|
|
| |
lldb-179 version numberings and the new lldb-300 version numberings.
Remove the pretense that someone might run this from the command
line; this is only used from within a live lldb debug session. Fix
the loading so it can be loaded via "script import lldb.macosx" or
the script can be loaded individually like "command script import
unwind_diagnose.py"
llvm-svn: 180085
|
|
|
|
|
|
|
|
|
|
|
| |
unwind instructions for a function/symbol which contains that
address.
Update the unwind_diagnose.py script to use this instead of doing
image show-unwind by name to avoid cases where there are multiple
name definitions.
llvm-svn: 180079
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It will be installed in the LLDB.framework and can be loaded with
(lldb) script import lldb.macosx
after which a "unwind-diagnose" command will be registered. Select
the thread which has a bad backtrace and run this command -- a lot
of information about the stack frames, and an alternate backtrace
algorithm, will be used. The information will often be sufficient
for a remote person to figure out why the backtrace failed.
<rdar://problem/13679300>
llvm-svn: 180077
|
|
|
|
|
|
| |
crashlog.py was always subtracting 1 to point to the previous instruction when symbolicating ARM backtraces. Many times the backtraces will include bit zero set to 1 to indicate thumb, so we need to make sure we mask the address and then backup one for non frame zero frames.
llvm-svn: 178812
|
|
|
|
| |
llvm-svn: 178708
|
|
|
|
|
|
| |
ptr_refs command frequently doesn't work when run in large applicaton. This was due to the default timeout of 500ms. The timeouts have now been increased and all expression evaluations have been modified.
llvm-svn: 178628
|
|
|
|
| |
llvm-svn: 178069
|
|
|
|
|
|
| |
the overhead of python interferes at all with our performance readings. We can try things out with this script and see how things go.
llvm-svn: 177811
|
|
|
|
|
|
| |
Python and reimplements them in C++. The Python Cocoa formatters are not shipped as part of LLDB anymore, but still exist in the source repository for user reference. Python formatters still exist for STL classes and users can still define their own Python formatters
llvm-svn: 177366
|
|
|
|
| |
llvm-svn: 177217
|
|
|
|
|
|
| |
and NSNotification
llvm-svn: 177213
|
|
|
|
|
|
|
| |
GDB-style linespecs. This command allows changing
the PC without manually looking up the new address.
llvm-svn: 176841
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a very basic implementation of a library that easily allows to drive LLDB.framework to write test cases for performance
This is separate from the LLDB testsuite in test/ in that:
a) this uses C++ instead of Python to avoid measures being affected by SWIG
b) this is in very early development and needs lots of tweaking before it can be considered functionally complete
c) this is not meant to test correctness but to help catch performance regressions
There is a sample application built against the library (in darwin/sketch) that uses the famous sample app Sketch as an inferior to measure certain basic parameters of LLDB's behavior.
The resulting output is a PLIST much like the following:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>fetch-frames</key>
<real>0.13161715522222225</real>
</dict>
<dict>
<key>file-line-bkpt</key>
<real>0.029111678750000002</real>
</dict>
<dict>
<key>fetch-modules</key>
<real>0.00026376766666666668</real>
</dict>
<dict>
<key>fetch-vars</key>
<real>0.17820429311111111</real>
</dict>
<dict>
<key>run-expr</key>
<real>0.029676525769230768</real>
</dict>
</array>
</plist>
Areas for improvement:
- code cleanups (I will be out of the office for a couple days this coming week, but please keep ideas coming!)
- more metrics and test cases
- better error checking
This toolkit also comprises a simple event-loop-driven controller for LLDB, similar yet much simpler to what the Driver does to implement the lldb command-line tool.
llvm-svn: 176715
|
|
|
|
|
|
|
|
| |
any modules that are specified as arguments to the "dump_module_line_tables" command.
I used this to verify that the debug map line tables were the same as previous LLDB releases prior to my change in the DWARF in .o file linking.
llvm-svn: 176610
|
|
|
|
| |
llvm-svn: 176059
|
|
|
|
| |
llvm-svn: 176049
|