summaryrefslogtreecommitdiffstats
path: root/lldb/examples
Commit message (Collapse)AuthorAgeFilesLines
...
* Added options to specify how many instructions before and after the frameGreg Clayton2012-01-211-12/+25
| | | | | | | PC to disassemble. Users can also specify the frame depth to disassemble to and also if disassembly should happen for all threads. llvm-svn: 148627
* Use the "shlex" module to parse the command line that was passed down intoGreg Clayton2012-01-211-6/+25
| | | | | | | | | | python so that single and double quotes and other standard shell like argument parsing happens as expected before passing stuff along to option parsing. Also handle exceptions so that we don't accidentally exit lldb if an uncaught exception occurs. llvm-svn: 148623
* Fixed it so the "--help" option works for the crashlog command. Corrected andGreg Clayton2012-01-211-172/+210
| | | | | | | | | | | | filled out the command help and removed unused options. Updated the command to have a "--load-all" option that will cause the target that gets created to locate and load all images specified in the Binary Images section of the crash log to allow for complete program state to be matched to that of the crash log, not just the images that were in the stack frames (the default). llvm-svn: 148605
* This file is no longer needed since the command:Greg Clayton2012-01-201-5/+0
| | | | | | | | (lldb) script import crashlog will automatically add the "crashlog" command to the command interpreter! llvm-svn: 148598
* Fixed a global reference that should have beenSean Callanan2012-01-201-1/+1
| | | | | | a reference to a class variable. llvm-svn: 148562
* Make the script work again from the command line as long as the PYTHONPATH Greg Clayton2012-01-201-54/+64
| | | | | | | | | | | | | | | | | environment variable it set to include a path to lldb.py. Also fixed the case where the executable can't be located and doesn't match what is installed on the current system. It will still symbolicate the other frames, and will just show what was originally in the crash log file. Also removed the --crash-log option so the arguments to the "crashlog" command are one or more paths to crash logs. Fixed the script to "auto-install" itself when loaded from the embedded script interpreter. Now you only need to import the module and the command is ready for use. llvm-svn: 148561
* More fixed to verify if a file in the crash log is installed in the currentGreg Clayton2012-01-201-38/+72
| | | | | | | system and also deal with dsymForUUID being available on the network, locally, and not at all. llvm-svn: 148534
* Improved the regular expressions to handle "+" characters being at the frontGreg Clayton2012-01-202-30/+41
| | | | | | | | | | of the identifier name in the binary images section. Improved the regular expression for the frames. Added a new file "crashlog.lldb" which can be sourced with "command source" that will import the module and set itself up to be used as a command. llvm-svn: 148529
* Modified the symbolicate-crash.py so it can be imported into python as aGreg Clayton2012-01-201-0/+622
| | | | | | | | | | | | | | | | | | | | | | | | | | module (you can't import a module with a '-' in it) and also added a Symbolcate(...) top level function so it can be imported and used as an LLDB command. Then you can import the module and map a "crashlog" command (for darwin use only currently) to the python function "crashlog.Symbolicate": (lldb) script import crashlog (lldb) command script add -f crashlog.Symbolicate crashlog Then use it to symbolicate: (lldb) crashlog --crash-log /path/to/foo.crash The crash log will then get symbolicated and inline frames will be added to the crash log and the frames will be displayed. The crash log currently will only try and fetch and setup the target images requires in order to do the symbolication. This will need to be iterated upon, but it is getting close to being useful so I am going to check this in. llvm-svn: 148528
* Add some usage documentation to the top of the source file.Greg Clayton2012-01-201-0/+33
| | | | llvm-svn: 148527
* Added a new tool that can be loaded into a user space darwin application and ↵Greg Clayton2012-01-202-0/+200
| | | | | | | | | | | | | | | | | | allows you to find data on the heap. To use this, make the project and then when stopped in your lldb debug session: (lldb) process load /path/to/libheap.dylib (lldb) find_pointer_in_heap (0x112233000000) This will grep everything in all active allocation blocks and print and malloc blocks that contain the pointer 0x112233000000. This can also work for c strings: (lldb) find_cstring_in_heap ("hello") llvm-svn: 148523
* More improvements to not follow child processes and improved logging that ↵Greg Clayton2012-01-161-223/+404
| | | | | | always shows the process info. llvm-svn: 148257
* Added some fixes for the fd interposing dylib:Greg Clayton2012-01-141-20/+19
| | | | | | | - don't strip too many frames from the backtrace when logging close backtraces - cleanup some logging messages llvm-svn: 148195
* Fix make errors (define the DYLIB_ONLY make variable).Johnny Chen2012-01-101-1/+1
| | | | llvm-svn: 147823
* Added a file descriptor interposing library for darwin. This can catch allGreg Clayton2012-01-102-0/+979
| | | | | | | | | | functions that can create file descriptors and close them. It will warn when there close file descriptor call that returns with EBADF and show the corresponding stack backtraces that caused the issue. It will also log all file descriptor create and delete calls. See the comments at the top of FDInterposing.cpp for all of the details. llvm-svn: 147816
* Add an example customization directory which uses a binutils.py module to ↵Johnny Chen2011-10-283-0/+110
| | | | | | | | provide commands to print the binary representaion of an integer. llvm-svn: 143252
* Remove extra newline in the docstring.Johnny Chen2011-10-281-4/+2
| | | | llvm-svn: 143228
* Add a binutils.py which contains Python functions for displaying bit ↵Johnny Chen2011-10-281-0/+53
| | | | | | representation of numbers. llvm-svn: 143173
* Add 'cd -' feature to change to the previous working directory.Johnny Chen2011-10-131-6/+30
| | | | llvm-svn: 141846
* Prepend '~' to the sys.path so that ~/utils.py takes precedence.Johnny Chen2011-10-121-1/+2
| | | | llvm-svn: 141817
* Patch by Enrico to provide an example of 'import' commnad for importing ↵Johnny Chen2011-10-122-0/+61
| | | | | | .py/.pyc files. llvm-svn: 141810
* Add an examples/customization directory and add a subdirectory pwd-cd-and-systemJohnny Chen2011-10-123-0/+74
| | | | | | | which contains the lldb init file and a utils.py Python module in order to add the 'pwd', 'cd', and 'system' lldb commands. llvm-svn: 141799
* Allow the crash log file path to contain an initial tilde component.Johnny Chen2011-10-061-1/+2
| | | | llvm-svn: 141340
* Simplify code to print symbols and sections within a module using the ↵Johnny Chen2011-10-061-9/+4
| | | | | | built-in iterators. llvm-svn: 141326
* Cleaned up the the code that figures out the inlined stack frames given a Greg Clayton2011-10-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | symbol context that represents an inlined function. This function has been renamed internally to: bool SymbolContext::GetParentOfInlinedScope (const Address &curr_frame_pc, SymbolContext &next_frame_sc, Address &next_frame_pc) const; And externally to: SBSymbolContext SBSymbolContext::GetParentOfInlinedScope (const SBAddress &curr_frame_pc, SBAddress &parent_frame_addr) const; The correct blocks are now correctly calculated. Switched the stack backtracing engine (in StackFrameList) and the address context printing over to using the internal SymbolContext::GetParentOfInlinedScope(...) so all inlined callstacks will match exactly. llvm-svn: 140910
* Fixed the public and internal disassembler API to be named correctly:Greg Clayton2011-09-271-5/+5
| | | | | | | | | | | | | | | const char * SBInstruction::GetMnemonic() const char * SBInstruction::GetOperands() const char * SBInstruction::GetComment() Fixed the symbolicate example script and the internals. llvm-svn: 140591
* Fixes for a few different versions of the darwin crash log.Greg Clayton2011-09-261-20/+32
| | | | llvm-svn: 140554
* Added an example that symbolicates symbol information. This fileGreg Clayton2011-09-261-0/+565
| | | | | | | | | | | | is mostly geared towards darwin crash logs at the moment, though it could be made more generic with a few tweaks. The symbolicate-crash.py script will make a target given a crash log and then symbolicate all frames and expand any frames that had inlined functions in them to show all frames back to the concrete function. It will also disassemble around the crash site. llvm-svn: 140544
* Objective-C runtime wrapperEnrico Granata2011-09-091-0/+128
| | | | llvm-svn: 139372
* More documentation changes (WIP)Enrico Granata2011-08-241-10/+34
| | | | llvm-svn: 138421
* Short option for --summary-string in 'type summary add' is now -s. This ↵Enrico Granata2011-08-232-16/+19
| | | | | | might be a breaking change for those who have summaries defined. llvm-svn: 138331
* Fixing a startup errorEnrico Granata2011-08-221-1/+1
| | | | llvm-svn: 138237
* Exception-awareness for gnu_libstdcpp formatters ; Documentation updateEnrico Granata2011-08-222-100/+136
| | | | llvm-svn: 138236
* First round of code cleanups:Enrico Granata2011-08-171-0/+231
| | | | | | | | | | | | | | | | | | - all instances of "vobj" have been renamed to "valobj" - class Debugger::Formatting has been renamed to DataVisualization (defined in FormatManager.h/cpp) The interface to this class has not changed - FormatCategory now uses ConstString's as keys to the navigators instead of repeatedly casting from ConstString to const char* and back all the time Next step is making the same happen for categories themselves - category gnu-libstdc++ is defined in the constructor for a FormatManager The source code for it is defined in gnu_libstdcpp.py, drawn from examples/synthetic at compile time All references to previous 'osxcpp' name have been removed from both code and file names Functional changes: - the name of the option to use a summary string for 'type summary add' has changed from the previous --format-string to the new --summary-string. It is expected that the short option will change from -f to -s, and -s for --python-script will become -o llvm-svn: 137886
* CFString.py now shows contents in a more NSString-like way (e.g. you get ↵Enrico Granata2011-08-091-9/+8
| | | | | | | | | | @"Hello" instead of "Hello") new --raw-output (-R) option to frame variable prevents using summaries and synthetic children other future formatting enhancements will be excluded by using the -R option test case enhanced to check that -R works correctly llvm-svn: 137185
* changing CFString.py to reflect the new behavior of CreateValueFromAddressEnrico Granata2011-08-041-1/+1
| | | | llvm-svn: 136887
* copying std:: SynthProviders in examples/syntheticEnrico Granata2011-08-043-74/+76
| | | | llvm-svn: 136863
* APIs to GetValueAsSigned/Unsigned() in SBValue now also accept an SBError ↵Enrico Granata2011-08-044-40/+77
| | | | | | | | | parameter to give more info about any problem The synthetic children providers now use the new (safer) APIs to get the values of objects As a side effect, fixed an issue in ValueObject where ResolveValue() was not always updating the value before reading it llvm-svn: 136861
* Cleaned up the NSString summary formatter to not print "<invalid object>" whenGreg Clayton2011-07-301-12/+29
| | | | | | | we have a nil NSString *. Also added blank lines between functions in the CFString.py files. llvm-svn: 136554
* changes in the new GetMinimumLanguages() ; robustness improvements in the ↵Enrico Granata2011-07-291-1/+16
| | | | | | CFStringSynthProvider object ; made a CFString_SummaryProvider function you can use if all you care about is the summary string for your NSString objects llvm-svn: 136544
* new synthetic children provider for CFString and related classes ; test case ↵Enrico Granata2011-07-291-0/+206
| | | | | | for it llvm-svn: 136525
* Public API changes:Enrico Granata2011-07-293-0/+189
| | | | | | | | | | | | | | | | | | | | | - Completely new implementation of SBType - Various enhancements in several other classes Python synthetic children providers for std::vector<T>, std::list<T> and std::map<K,V>: - these return the actual elements into the container as the children of the container - basic template name parsing that works (hopefully) on both Clang and GCC - find them in examples/synthetic and in the test suite in functionalities/data-formatter/data-formatter-python-synth New summary string token ${svar : - the syntax is just the same as in ${var but this new token lets you read the values coming from the synthetic children provider instead of the actual children - Python providers above provide a synthetic child len that returns the number of elements into the container Full bug fix for the issue in which getting byte size for a non-complete type would crash LLDB Several other fixes, including: - inverted the order of arguments in the ClangASTType constructor - EvaluationPoint now only returns SharedPointer's to Target and Process - the help text for several type subcommands now correctly indicates argument-less options as such llvm-svn: 136504
* another possible incarnation of a C++ string straight from llvm-gcc build 5658Enrico Granata2011-07-271-1/+1
| | | | llvm-svn: 136293
* make the C++stdlib string summary work even if for some reason ↵Enrico Granata2011-07-271-1/+1
| | | | | | std::basic_string<char> ends up in the debug info instead of std::string llvm-svn: 136246
* Add newline at end of file.Johnny Chen2011-07-261-1/+1
| | | | llvm-svn: 136028
* Minor modification.Johnny Chen2011-07-261-1/+2
| | | | llvm-svn: 136026
* Add an example type summary -- for lldb::ConnectionStatus.Johnny Chen2011-07-251-0/+1
| | | | llvm-svn: 135997
* Don't delete & remake the exception breakpoints every time you need them. ↵Jim Ingham2011-07-231-12/+13
| | | | | | | | | Make them once & enable/disable them as appropriate. Also reformatted the lldb summaries to make them easier to read, and added one. I'll do more as I get time. llvm-svn: 135827
* essentials contains two small summaries that you might really want to use; ↵Enrico Granata2011-07-212-0/+14
| | | | | | lldb contains some basic summaries for use in debugging LLDB itself. to use them, you must type category enable lldb llvm-svn: 135653
* Add usage docstring to SBValue.h, and minor update of docstrings for ↵Johnny Chen2011-07-151-1/+1
| | | | | | SBValueList.h. llvm-svn: 135230
OpenPOWER on IntegriCloud