summaryrefslogtreecommitdiffstats
path: root/lldb/examples
Commit message (Collapse)AuthorAgeFilesLines
...
* <rdar://problem/12161825> Rephrase formatter for NSIndexSet in terms of ↵Enrico Granata2012-09-181-1/+1
| | | | | | indexes instead of objects llvm-svn: 164149
* Making sure to create the count attribute in synthetic children providers ↵Enrico Granata2012-09-131-0/+2
| | | | | | for libcxx at the right time llvm-svn: 163823
* Modified the command template to include best practices.Greg Clayton2012-09-131-17/+24
| | | | llvm-svn: 163773
* Don't allow an extra entry to slip into the heap results and also add a ↵Greg Clayton2012-09-122-15/+42
| | | | | | better output format llvm-svn: 163675
* Added some documentation and an accessor for the target with an explanation ↵Greg Clayton2012-09-121-1/+21
| | | | | | of why to not use "lldb.target". llvm-svn: 163671
* Added "heap" command to get info on all allocations on the heap. Currently ↵Greg Clayton2012-09-112-39/+113
| | | | | | only objective C objects are supported since they are easy to detect. llvm-svn: 163637
* Print the stack size followed by the full stack info.Greg Clayton2012-09-111-2/+2
| | | | llvm-svn: 163589
* Added a python example that will compute which functions in a process are ↵Greg Clayton2012-09-101-0/+56
| | | | | | hogging the stack. llvm-svn: 163543
* Playing around with "objc_refs" over the weekend and improved it to work on ↵Greg Clayton2012-09-102-34/+253
| | | | | | a large ObjC program without running into expression timeouts. Now we get a full list of ObjC classes using a runtime function and then qsort the result. Also added code that can count all instances of each ObjC on the heap and also the total byte sizes for the object allocations. llvm-svn: 163520
* Don't allocate memory when enumerting stack. We now have fixed size buffers ↵Greg Clayton2012-09-081-61/+147
| | | | | | to avoid this issue. llvm-svn: 163441
* Added a quick example to show how disasembly output can be customized.Greg Clayton2012-09-071-0/+24
| | | | llvm-svn: 163421
* <rdar://problem/12068655> Make sure [NSDate distantPast] is formatted correctlyEnrico Granata2012-09-041-0/+4
| | | | llvm-svn: 163162
* Editing a comment to make sure people know not to blame CFString.py for ↵Enrico Granata2012-09-041-2/+2
| | | | | | CFString summary errors llvm-svn: 163157
* <rdar://problem/11485744> Implement important data formatters in C++. Have ↵Enrico Granata2012-09-044-4/+8
| | | | | | the Objective-C language runtime plugin expose class descriptors objects akin to the objc_runtime.py Pythonic implementation. Rewrite the data formatters for some core Cocoa classes in C++ instead of Python. llvm-svn: 163155
* Improved "objc_refs" a bit to be able to find all instances of a class'Greg Clayton2012-09-043-13/+132
| | | | | | | superclasses on top of finding the exact class. The current attempt is still too slow, but it lays the groundwork. llvm-svn: 163135
* <rdar://problem/12069589>Greg Clayton2012-09-012-52/+49
| | | | | | | | Fixed an issue where not all text would always be seen when running any of the functions in heap.py in Xcode. Now we put the text directly into the command result object and skip STDIO since we have issues with STDIO right now in python scripts. Also fixed an issue with the "--stack-history" option where MallocStackLoggingNoCompact was assumed to have to be enabled... It doesn't, just MallocStackLogging. llvm-svn: 163042
* Make the tab character in the thread frame lines optional.Jason Molenda2012-08-311-1/+1
| | | | llvm-svn: 163037
* Added command lists that can be executed on launch, stop, crash and exit. ↵Greg Clayton2012-08-311-15/+71
| | | | | | Added code to auto import the lldb module that we can use on many stand alone modules. llvm-svn: 162972
* Added an example that show correct usage of the async process event API.Greg Clayton2012-08-311-0/+139
| | | | llvm-svn: 162967
* <rdar://problem/11757916>Greg Clayton2012-08-292-6/+23
| | | | | | | | | | | | Make breakpoint setting by file and line much more efficient by only looking for inlined breakpoint locations if we are setting a breakpoint in anything but a source implementation file. Implementing this complex for a many reasons. Turns out that parsing compile units lazily had some issues with respect to how we need to do things with DWARF in .o files. So the fixes in the checkin for this makes these changes: - Add a new setting called "target.inline-breakpoint-strategy" which can be set to "never", "always", or "headers". "never" will never try and set any inlined breakpoints (fastest). "always" always looks for inlined breakpoint locations (slowest, but most accurate). "headers", which is the default setting, will only look for inlined breakpoint locations if the breakpoint is set in what are consudered to be header files, which is realy defined as "not in an implementation source file". - modify the breakpoint setting by file and line to check the current "target.inline-breakpoint-strategy" setting and act accordingly - Modify compile units to be able to get their language and other info lazily. This allows us to create compile units from the debug map and not have to fill all of the details in, and then lazily discover this information as we go on debuggging. This is needed to avoid parsing all .o files when setting breakpoints in implementation only files (no inlines). Otherwise we would need to parse the .o file, the object file (mach-o in our case) and the symbol file (DWARF in the object file) just to see what the compile unit was. - modify the "SymbolFileDWARFDebugMap" to subclass lldb_private::Module so that the virtual "GetObjectFile()" and "GetSymbolVendor()" functions can be intercepted when the .o file contenst are later lazilly needed. Prior to this fix, when we first instantiated the "SymbolFileDWARFDebugMap" class, we would also make modules, object files and symbol files for every .o file in the debug map because we needed to fix up the sections in the .o files with information that is in the executable debug map. Now we lazily do this in the DebugMapModule::GetObjectFile() Cleaned up header includes a bit as well. llvm-svn: 162860
* Instead of using re.split and requiring two spaces between the "regname: ↵Jason Molenda2012-08-281-1/+2
| | | | | | | | | regvalue" pairs, use re.findall and specify the regexp of regname: regvalue that we're interested in. <rdar://problem/12188752> llvm-svn: 162806
* Data formatters for libc++ deque and shared/weak ptrs - a contribution by ↵Enrico Granata2012-08-272-3/+188
| | | | | | Jared Grubb llvm-svn: 162680
* The OS plug-in can now get data from a python script that implements the ↵Greg Clayton2012-08-241-3/+4
| | | | | | protocol. llvm-svn: 162540
* We have a partially working OS plug-in through python!Greg Clayton2012-08-241-6/+8
| | | | llvm-svn: 162532
* Fixing an issue in the OS sampleEnrico Granata2012-08-241-0/+1
| | | | llvm-svn: 162531
* Added Args::StringForEncoding(), Args::StringToGenericRegister() and ↵Greg Clayton2012-08-241-0/+63
| | | | | | | | centralized the parsing of the string to encoding and string to generic register. Added code the initialize the register context in the OperatingSystemPython plug-in with the new PythonData classes, and added a test OperatingSystemPython module in lldb/examples/python/operating_system.py that we can use for testing. llvm-svn: 162530
* Modified .lldb-loggings now to direct the lldb log files to the same session ↵Johnny Chen2012-08-222-1/+67
| | | | | | directory which also houses the test logs. llvm-svn: 162387
* Demonstrate how to use the config file and the pre-flight functionality to ↵Johnny Chen2012-08-224-0/+189
| | | | | | | | | route the lldb gdb-remote log messages into individually named log destinations. In the simple usage-lldb-loggings example, we ran two cases which resulted in two lldb_log files. llvm-svn: 162378
* Added qVAttachOrWaitSupported packet support.Greg Clayton2012-08-201-0/+1
| | | | llvm-svn: 162207
* <rdar://problem/12087275>Greg Clayton2012-08-131-1/+1
| | | | | | Make the crashlog parser able to deal with spaces in the process name. llvm-svn: 161772
* Added a new "objc_refs" command that will track down all allocations on the ↵Greg Clayton2012-08-112-48/+96
| | | | | | heap that have the "isa" for the objective C class at offset zero. This will need to be improved to deal with KVO classes, but it is a start. It also disallows looking up a pointer value of zero since that would return way too many matches. llvm-svn: 161724
* Make the objc-runtime work with Python 2.6Filipe Cabecinhas2012-08-011-8/+20
| | | | llvm-svn: 161111
* Added a few more summaries I find useful for lldb.Jim Ingham2012-07-281-14/+27
| | | | llvm-svn: 160909
* Enable the "symbolicate" interactive command to symbolicate all crash logs ↵Greg Clayton2012-07-161-15/+18
| | | | | | | | | | | | | | | | | | | | | if no indexes are supplied. This can be handy to use as: (lldb) script import lldb.macosx.crashlog (lldb) crashlog -i /tmp/*.crash % symbolicate --crashed-only This will symbolicate all of the crash logs only for the crashed thread. Also print out the crash log index number in the output of the interactive "image" command: (lldb) script import lldb.macosx.crashlog (lldb) crashlog -i /tmp/*.crash % image LLDB.framework ... This then allows you to symbolicate a crash log by index accurately when you looked for an image of a specific version llvm-svn: 160316
* <rdar://problem/11773899> Formatters for BOOL* and BOOL&Enrico Granata2012-07-131-1/+8
| | | | llvm-svn: 160181
* <rdar://problem/11753405> Making sure we deal correctly with signed NSNumber ↵Enrico Granata2012-07-131-10/+12
| | | | | | values llvm-svn: 160179
* Show source by default for the first 4 frames of the crash thread. Also ↵Greg Clayton2012-07-131-13/+18
| | | | | | added options to allow showing source for all frames (--source-frames=NFRAMES) and for all threads (--source-all). llvm-svn: 160175
* Added the ability to see source context with each frame in the "crashlog" ↵Greg Clayton2012-07-131-8/+37
| | | | | | | | command with the "--source-context" (-C for short to match grep) option. Also made the symbolication of the crash logs more efficient when using the "--crashed-only" ("-c") option where only the crashed thread is symbolicated. We now only download the images for the frames in the crashed thread. llvm-svn: 160160
* Added the ability to search through sections for pointer data.Greg Clayton2012-07-112-53/+145
| | | | llvm-svn: 160083
* Make const result value objects able to return dynamic types.Greg Clayton2012-07-072-69/+83
| | | | | | Modified the heap.py to be able to correctly indentify the exact ivar for the "ptr_refs" command no matter how deep the ivar is in a class hierarchy. Also fixed the ability for the heap command to symbolicate the stack backtrace when MallocStackLogging is set in the environment and the "--stack" option was specified. llvm-svn: 159883
* Added a new example that extracts all global variables from an object file ↵Greg Clayton2012-07-051-0/+72
| | | | | | and prints any available info. llvm-svn: 159775
* Make the interactive command interpreter build into the "crashlog" command ↵Greg Clayton2012-07-031-0/+1
| | | | | | work correctly when run inside LLDB. Before this fix the "cmd.Cmd" object was trying to read from stdin itself and it was competing without command interpreter for the bytes. llvm-svn: 159688
* Listen to the "--verbose" flag when running "crashlog" and if verbose is ↵Greg Clayton2012-06-282-16/+25
| | | | | | | | enabled, then dump full paths to source files and modules. Changed much of the output that was coming out with "--verbose" over to use the new "--debug" flag. llvm-svn: 159363
* Added a "save_crashlog" command to the lldb.macosx.crashlog package that ↵Greg Clayton2012-06-271-1/+81
| | | | | | allow you to dump your current process state out to a crash log file. This will dump all of the target module information with all load addresses, UUID values, and shared library paths, as well as all thread stacks and the crash log header. This will make it easy for us to save the current state of a process and then reload it later into LLDB. llvm-svn: 159286
* Check the return status of the make command.Greg Clayton2012-06-271-2/+3
| | | | llvm-svn: 159284
* Remove dependency on internal header file.Greg Clayton2012-06-271-4/+72
| | | | llvm-svn: 159283
* Cleaned up some stuff in symbolication where we can now lazily get images ↵Greg Clayton2012-06-043-135/+201
| | | | | | | | when symbolicating after loading a crash log file. Added colorization to the gdbremote.py output and also added the ability to symbolicate the addresses in registers. llvm-svn: 157965
* Added the ability to disassembly GDB remote packets with the python file. ↵Greg Clayton2012-06-011-22/+821
| | | | | | This will make it easier to symbolicate the packet log output since we can use the lldb.utils.symbolication package module to symbolicate register values. llvm-svn: 157835
* Added the ability to run "symbolicate [options] <crashlog-index>" in ↵Greg Clayton2012-05-311-98/+123
| | | | | | interactive mode. llvm-svn: 157770
* Fixes for performance to data formatters - Python < 3.0 is much slower when ↵Enrico Granata2012-05-211-114/+110
| | | | | | using True/False as compared to 1/0 for logical values. Wexploit this to our advantage. Other minor tweaks llvm-svn: 157209
OpenPOWER on IntegriCloud