summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/Python
Commit message (Collapse)AuthorAgeFilesLines
* Export the ability to see if a symbol is externally visible and also if the ↵Greg Clayton2012-04-021-1/+14
| | | | | | symbol was synthetically added to the symbol table (the symbol was not part of the symbol table itself but came from another section). llvm-svn: 153893
* Part 1 of a series of fixes meant to improve reliability and increase ease ↵Enrico Granata2012-03-291-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of bug fixing for data formatter issues. We are introducing a new Logger class on the Python side. This has the same purpose, but is unrelated, to the C++ logging facility The Pythonic logging can be enabled by using the following scripting commands: (lldb) script Logger._lldb_formatters_debug_level = {0,1,2,...} 0 = no logging 1 = do log 2 = flush after logging each line - slower but safer 3 or more = each time a Logger is constructed, log the function that has created it more log levels may be added, each one being more log-active than the previous by default, the log output will come out on your screen, to direct it to a file: (lldb) script Logger._lldb_formatters_debug_filename = 'filename' that will make the output go to the file - set to None to disable the file output and get screen logging back Logging has been enabled for the C++ STL formatters and for Cocoa class NSData - more logging will follow synthetic children providers for classes list and map (both libstdcpp and libcxx) now have internal capping for safety reasons this will fix crashers where a malformed list or map would not ever meet our termination conditions to set the cap to a different value: (lldb) script {gnu_libstdcpp|libcxx}.{map|list}_capping_size = new_cap (by default, it is 255) you can optionally disable the loop detection algorithm for lists (lldb) script {gnu_libstdcpp|libcxx}.list_uses_loop_detector = False llvm-svn: 153676
* adding a summary for Objective-C type 'Class'Enrico Granata2012-03-271-0/+14
| | | | llvm-svn: 153541
* Synthetic values are now automatically enabled and active by default. ↵Enrico Granata2012-03-271-28/+28
| | | | | | | | | | | | SBValue is set up to always wrap a synthetic value when one is available. A new setting enable-synthetic-value is provided on the target to disable this behavior. There also is a new GetNonSyntheticValue() API call on SBValue to go back from synthetic to non-synthetic. There is no call to go from non-synthetic to synthetic. The test suite has been changed accordingly. Fallout from changes to type searching: an hack has to be played to make it possible to use maps that contain std::string due to the special name replacement operated by clang Fixing a test case that was using libstdcpp instead of libc++ - caught as a consequence of said changes to type searching llvm-svn: 153495
* Adding a new API call IsTypeComplete() to SBType. This call is meant to ↵Enrico Granata2012-03-241-1/+6
| | | | | | | | check if the type has been previously completed or not (which is mostly interesting from a performance point of view) Adding a test case that checks that we do not complete types before due time. This should help us track cases similar to the cascading data formatters. llvm-svn: 153363
* Massive enumeration name changes: a number of enums in ValueObject were not ↵Enrico Granata2012-03-191-5/+13
| | | | | | | | | | | | | | | | | | following the naming pattern Changes to synthetic children: - the update(self): function can now (optionally) return a value - if it returns boolean value True, ValueObjectSyntheticFilter will not clear its caches across stop-points this should allow better performance for Python-based synthetic children when one can be sure that the child ValueObjects have not changed - making a difference between a synthetic VO and a VO with a synthetic value: now a ValueObjectSyntheticFilter will not return itself as its own synthetic value, but will (correctly) claim to itself be synthetic - cleared up the internal synthetic children architecture to make a more consistent use of pointers and references instead of shared pointers when possible - major cleanup of unnecessary #include, data and functions in ValueObjectSyntheticFilter itself - removed the SyntheticValueType enum and replaced it with a plain boolean (to which it was equivalent in the first place) Some clean ups to the summary generation code Centralized the code that clears out user-visible strings and data in ValueObject More efficient summaries for libc++ containers llvm-svn: 153061
* Export the APIs submitted by Dawn to the Python bindings. Add a simple test ↵Johnny Chen2012-03-163-1/+20
| | | | | | case for the SBModule.compile_unit_iter() API. llvm-svn: 152952
* Added formatters for libc++ (http://libcxx.llvm.org):Enrico Granata2012-03-121-0/+14
| | | | | | | | | | | | | std::string has a summary provider std::vector std::list and std::map have both a summary and a synthetic children provider Given the usage of a custom namespace (std::__1::classname) for the implementation of libc++, we keep both libstdcpp and libc++ formatters enabled at the same time since that raises no conflicts and enabled for seamless transition between the two The formatters for libc++ reside in a libcxx category, and are loaded from libcxx.py (to be found in examples/synthetic) The formatters-stl test cases have been divided to be separate for libcxx and libstdcpp. This separation is necessary because (a) we need different compiler flags for libc++ than for libstdcpp (b) libc++ inlines a lot more than libstdcpp and some code changes were required to accommodate this difference llvm-svn: 152570
* Added the ability to disassembly "count" instructions given a SBAddress. Greg Clayton2012-03-061-0/+3
| | | | | | | | | | | This was done in SBTarget: lldb::SBInstructionList lldb::SBTarget::ReadInstructions (lldb::SBAddress base_addr, uint32_t count); Also cleaned up a few files in the LLDB.framework settings. llvm-svn: 152152
* Add a command and an SB API to create exception breakpoints. Make the break ↵Jim Ingham2012-03-061-0/+12
| | | | | | output prettier for Exception breakpoints. llvm-svn: 152081
* Copying a new file required for the updated formatters to work into ↵Enrico Granata2012-03-051-0/+14
| | | | | | LLDB.framework llvm-svn: 152053
* rdar://problem/10976649Johnny Chen2012-03-051-0/+3
| | | | | | | Add SBFrame::IsEqual(const SBFrame &that) method and export it to the Python binding. Alos add a test case test_frame_api_IsEqual() to TestFrames.py file. llvm-svn: 152050
* added a new formatter for CF(Mutable)BitVectorEnrico Granata2012-03-033-12/+178
| | | | | | | | fixed a few potential NULL-pointer derefs in ValueObject we have a way to provide docstrings for properties we add to the SWIG layer - a few of these properties have a docstring already, more will come in future commits added a new bunch of properties to SBData to make it more natural and Python-like to access the data they contain llvm-svn: 151962
* (a) adding formatters for:Enrico Granata2012-03-021-0/+14
| | | | | | | | NSTimeZone and CFTimeZonRef SEL and related types CFGregorianDate llvm-svn: 151866
* (a) adding an introspection formatter for NS(Mutable)IndexSetEnrico Granata2012-03-011-0/+14
| | | | | | | | | (b) fixes and improvements to the formatters for NSDate and NSString (c) adding an introspection formatter for NSCountedSet (d) making the Objective-C formatters test cases pass on both 64 and 32 bit one of the test cases is marked as expected failure on i386 - support needs to be added to the LLDB core for it to pass llvm-svn: 151826
* This commit:Enrico Granata2012-02-292-91/+79
| | | | | | | | | | | | | a) adds a Python summary provider for NSDate b) changes the initialization for ScriptInterpreter so that we are not passing a bulk of Python-specific function pointers around c) provides a new ScriptInterpreterObject class that allows for ref-count safe wrapping of scripting objects on the C++ side d) contains much needed performance improvements: 1) the pointer to the Python function generating a scripted summary is now cached instead of looked up every time 2) redundant memory reads in the Python ObjC runtime wrapper are eliminated 3) summaries now use the m_summary_str in ValueObject to store their data instead of passing around ( == copying) an std::string object e) contains other minor fixes, such as adding descriptive error messages for some cases of summary generation failure llvm-svn: 151703
* Added some missing accessors to the SBAttachInfo for user and group IDGreg Clayton2012-02-241-0/+18
| | | | | | getting, setting, and checking. llvm-svn: 151408
* Fixed the launching code when using the new SBLaunchInfo.Greg Clayton2012-02-241-21/+2
| | | | llvm-svn: 151392
* Added the new way we will eventually do all attaches and launches. First clientsGreg Clayton2012-02-241-0/+183
| | | | | | | | | | | | | | | | | | | | | will fill out either a SBLaunchInfo or SBAttachInfo class, then call: SBProcess SBTarget::Launch (SBLaunchInfo &, SBError &); SBProcess SBTarget::Attach (SBAttachInfo &, SBError &); The attach is working right now and allows the ability to set many filters such as the parent process ID, the user/group ID, the effective user/group ID, and much more. The launch is not yet working, but I will get this working soon. By changing our launch and attach calls to take an object, it allows us to add more capabilities to launching and attaching without having to have launch and attach functions that take more and more arguments. Once this is all working we will deprecated the older launch and attach fucntions and eventually remove them. llvm-svn: 151344
* This patch provides a set of formatters for most of the commonly used Cocoa ↵Enrico Granata2012-02-231-1/+240
| | | | | | | | | | classes. The formatter for NSString is an improved version of the one previously shipped as an example, the others are new in design and implementation. A more robust and OO-compliant Objective-C runtime wrapper is provided for runtime versions 1 and 2 on 32 and 64 bit. The formatters are contained in a category named "AppKit", which is not enabled at startup. llvm-svn: 151299
* typemaps to allow Python to invoke the new SBModule::GetVersion() API. ↵Enrico Granata2012-02-231-0/+42
| | | | | | Memory management is taken care of automatically so that Python users can simply say my_list = my_module.GetVersion() and receive a new list with the version numbers, if any, inside. llvm-svn: 151271
* Added the ability to get a ObjectFile versions from the ObjectFileGreg Clayton2012-02-221-0/+4
| | | | | | | subclasses if the object files support version numbering. Exposed this through SBModule for upcoming data formatter version checking stuff. llvm-svn: 151190
* Patch Enrico's changes from r150558 on 2012-02-14 to build even if PythonJason Molenda2012-02-211-0/+9
| | | | | | | | | | | | is not available (LLDB_DISABLE_PYTHON is defined). Change build-swig-Python.sh to emit an empty LLDBPythonWrap.cpp file if this build is LLDB_DISABLE_PYTHON. Change the "Copy to Xcode.app" shell script phase in the lldb.xcodeproj to only do this copying for Mac native builds. llvm-svn: 151035
* Add a logging mode that takes a callback and flush'es to that callback.Jim Ingham2012-02-211-0/+6
| | | | | | Also add SB API's to set this callback, and to enable the log channels. llvm-svn: 151018
* Adding formatters for several useful Objective-C/Cocoa data types. The new ↵Enrico Granata2012-02-172-0/+17
| | | | | | | | | | categories are not enabled at startup, but can be manually activated if desired. Adding new API calls to SBValue to be able to retrieve the associated formatters Some refactoring to FormatNavigator::Get() in order to shrink its size down to more manageable terms (a future, massive, refactoring effort will still be needed) Test cases added for the above llvm-svn: 150784
* Add a general mechanism to wait on the debugger for Broadcasters of a given ↵Jim Ingham2012-02-166-0/+24
| | | | | | | | | class/event bit set. Use this to allow the lldb Driver to emit notifications for breakpoint modifications. <rdar://problem/10619974> llvm-svn: 150665
* <rdar://problem/10062621>Enrico Granata2012-02-159-0/+624
| | | | | | | | | | | | | | | | | | New public API for handling formatters: creating, deleting, modifying categories, and formatters, and managing type/formatter association. This provides SB classes for each of the main object types involved in providing formatter support: SBTypeCategory SBTypeFilter SBTypeFormat SBTypeSummary SBTypeSynthetic plus, an SBTypeNameSpecifier class that is used on the public API layer to abstract the notion that formatters can be applied to plain type-names as well as to regular expressions For naming consistency, this patch also renames a lot of formatters-related classes. Plus, the changes in how flags are handled that started with summaries is now extended to other classes as well. A new enum (lldb::eTypeOption) is meant to support this on the public side. The patch also adds several new calls to the formatter infrastructure that are used to implement by-index accessing and several other design changes required to accommodate the new API layer. An architectural change is introduced in that backing objects for formatters now become writable. On the public API layer, CoW is implemented to prevent unwanted propagation of changes. Lastly, there are some modifications in how the "default" category is constructed and managed in relation to other categories. llvm-svn: 150558
* Send Breakpoint Changed events for all the relevant changes to breakpoints.Jim Ingham2012-02-082-0/+9
| | | | | | | Also, provide and use accessors for the thread options on breakpoints so we can control sending the appropriate events. llvm-svn: 150057
* Removed all of the "#ifndef SWIG" from the SB header files since we are usingGreg Clayton2012-02-067-37/+245
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | interface (.i) files for each class. Changed the FindFunction class from: uint32_t SBTarget::FindFunctions (const char *name, uint32_t name_type_mask, bool append, lldb::SBSymbolContextList& sc_list) uint32_t SBModule::FindFunctions (const char *name, uint32_t name_type_mask, bool append, lldb::SBSymbolContextList& sc_list) To: lldb::SBSymbolContextList SBTarget::FindFunctions (const char *name, uint32_t name_type_mask = lldb::eFunctionNameTypeAny); lldb::SBSymbolContextList SBModule::FindFunctions (const char *name, uint32_t name_type_mask = lldb::eFunctionNameTypeAny); This makes the API easier to use from python. Also added the ability to append a SBSymbolContext or a SBSymbolContextList to a SBSymbolContextList. Exposed properties for lldb.SBSymbolContextList in python: lldb.SBSymbolContextList.modules => list() or all lldb.SBModule objects in the list lldb.SBSymbolContextList.compile_units => list() or all lldb.SBCompileUnits objects in the list lldb.SBSymbolContextList.functions => list() or all lldb.SBFunction objects in the list lldb.SBSymbolContextList.blocks => list() or all lldb.SBBlock objects in the list lldb.SBSymbolContextList.line_entries => list() or all lldb.SBLineEntry objects in the list lldb.SBSymbolContextList.symbols => list() or all lldb.SBSymbol objects in the list This allows a call to the SBTarget::FindFunctions(...) and SBModule::FindFunctions(...) and then the result can be used to extract the desired information: sc_list = lldb.target.FindFunctions("erase") for function in sc_list.functions: print function for symbol in sc_list.symbols: print symbol Exposed properties for the lldb.SBSymbolContext objects in python: lldb.SBSymbolContext.module => lldb.SBModule lldb.SBSymbolContext.compile_unit => lldb.SBCompileUnit lldb.SBSymbolContext.function => lldb.SBFunction lldb.SBSymbolContext.block => lldb.SBBlock lldb.SBSymbolContext.line_entry => lldb.SBLineEntry lldb.SBSymbolContext.symbol => lldb.SBSymbol Exposed properties for the lldb.SBBlock objects in python: lldb.SBBlock.parent => lldb.SBBlock for the parent block that contains lldb.SBBlock.sibling => lldb.SBBlock for the sibling block to the current block lldb.SBBlock.first_child => lldb.SBBlock for the first child block to the current block lldb.SBBlock.call_site => for inline functions, return a lldb.declaration object that gives the call site file, line and column lldb.SBBlock.name => for inline functions this is the name of the inline function that this block represents lldb.SBBlock.inlined_block => returns the inlined function block that contains this block (might return itself if the current block is an inlined block) lldb.SBBlock.range[int] => access the address ranges for a block by index, a list() with start and end address is returned lldb.SBBlock.ranges => an array or all address ranges for this block lldb.SBBlock.num_ranges => the number of address ranges for this blcok SBFunction objects can now get the SBType and the SBBlock that represents the top scope of the function. SBBlock objects can now get the variable list from the current block. The value list returned allows varaibles to be viewed prior with no process if code wants to check the variables in a function. There are two ways to get a variable list from a SBBlock: lldb::SBValueList SBBlock::GetVariables (lldb::SBFrame& frame, bool arguments, bool locals, bool statics, lldb::DynamicValueType use_dynamic); lldb::SBValueList SBBlock::GetVariables (lldb::SBTarget& target, bool arguments, bool locals, bool statics); When a SBFrame is used, the values returned will be locked down to the frame and the values will be evaluated in the context of that frame. When a SBTarget is used, global an static variables can be viewed without a running process. llvm-svn: 149853
* <rdar://problem/10560053>Greg Clayton2012-02-051-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed "target modules list" (aliased to "image list") to output more information by default. Modified the "target modules list" to have a few new options: "--header" or "-h" => show the image header address "--offset" or "-o" => show the image header address offset from the address in the file (the slide applied to the shared library) Removed the "--symfile-basename" or "-S" option, and repurposed it to "--symfile-unique" "-S" which will show the symbol file if it differs from the executable file. ObjectFile's can now be loaded from memory for cases where we don't have the files cached locally in an SDK or net mounted root. ObjectFileMachO can now read mach files from memory. Moved the section data reading code into the ObjectFile so that the object file can get the section data from Process memory if the file is only in memory. lldb_private::Module can now load its object file in a target with a rigid slide (very common operation for most dynamic linkers) by using: bool Module::SetLoadAddress (Target &target, lldb::addr_t offset, bool &changed) lldb::SBModule() now has a new constructor in the public interface: SBModule::SBModule (lldb::SBProcess &process, lldb::addr_t header_addr); This will find an appropriate ObjectFile plug-in to load an image from memory where the object file header is at "header_addr". llvm-svn: 149804
* Allow a SBAddress to be created from a SBSection and an offset.Greg Clayton2012-02-043-3/+15
| | | | | | | | Changed the lldb.SBModule.section[<str>] property to return a single section. Added a lldb.SBSection.addr property which returns an lldb.SBAddress object. llvm-svn: 149755
* Convert all python objects in our API to use overload the __str__ methodGreg Clayton2012-02-041-55/+79
| | | | | | | | | | | | | | | | instead of the __repr__. __repr__ is a function that should return an expression that can be used to recreate an python object and we were using it to just return a human readable string. Fixed a crasher when using the new implementation of SBValue::Cast(SBType). Thread hardened lldb::SBValue and lldb::SBWatchpoint and did other general improvements to the API. Fixed a crasher in lldb::SBValue::GetChildMemberWithName() where we didn't correctly handle not having a target. llvm-svn: 149743
* Expose more convenience functionality in the python classes.Greg Clayton2012-02-034-0/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lldb.SBValueList now exposes the len() method and also allows item access: lldb.SBValueList[<int>] - where <int> is an integer index into the list, returns a single lldb.SBValue which might be empty if the index is out of range lldb.SBValueList[<str>] - where <str> is the name to look for, returns a list() of lldb.SBValue objects with any matching values (the list might be empty if nothing matches) lldb.SBValueList[<re>] - where <re> is a compiles regular expression, returns a list of lldb.SBValue objects for containing any matches or a empty list if nothing matches lldb.SBFrame now exposes: lldb.SBFrame.variables => SBValueList of all variables that are in scope lldb.SBFrame.vars => see lldb.SBFrame.variables lldb.SBFrame.locals => SBValueList of all variables that are locals in the current frame lldb.SBFrame.arguments => SBValueList of all variables that are arguments in the current frame lldb.SBFrame.args => see lldb.SBFrame.arguments lldb.SBFrame.statics => SBValueList of all static variables lldb.SBFrame.registers => SBValueList of all registers for the current frame lldb.SBFrame.regs => see lldb.SBFrame.registers Combine any of the above properties with the new lldb.SBValueList functionality and now you can do: y = lldb.frame.vars['rect.origin.y'] or vars = lldb.frame.vars for i in range len(vars): print vars[i] Also expose "lldb.SBFrame.var(<str>)" where <str> can be en expression path for any variable or child within the variable. This makes it easier to get a value from the current frame like "rect.origin.y". The resulting value is also not a constant result as expressions will return, but a live value that will continue to track the current value for the variable expression path. lldb.SBValue now exposes: lldb.SBValue.unsigned => unsigned integer for the value lldb.SBValue.signed => a signed integer for the value llvm-svn: 149684
* Fixed casting in the lldb::SBValue::Cast(SBType) function.Greg Clayton2012-02-031-1/+17
| | | | llvm-svn: 149673
* Cleaned up the documentation strings for many helper objects and addedGreg Clayton2012-02-034-26/+79
| | | | | | lldb.SBModule.section and lldb.SBModule.sections property access. llvm-svn: 149665
* Added support to SBType for getting template arguments from a SBType:Greg Clayton2012-02-031-0/+9
| | | | | | | | | | | | | | | | | | uint32_t SBType::GetNumberOfTemplateArguments (); lldb::SBType SBType::GetTemplateArgumentType (uint32_t idx); lldb::TemplateArgumentKind SBType::GetTemplateArgumentKind (uint32_t idx); Some lldb::TemplateArgumentKind values don't have a corresponding SBType that will be returned from SBType::GetTemplateArgumentType(). This will help our data formatters do their job by being able to find out the type of template params and do smart things with those. llvm-svn: 149658
* ensure that changes to the typemaps are properly detected and cause SWIG to ↵Enrico Granata2012-02-021-0/+14
| | | | | | rebuild LLDBWrapPython.cpp llvm-svn: 149606
* When outputting hex values use unsigned integer values so we don't getGreg Clayton2012-02-021-2/+7
| | | | | | | negative hex values. Also added a very rudimentary version of the == and != operators to the lldb.value helper class. llvm-svn: 149564
* Added many more python convenience accessors:Greg Clayton2012-02-0112-8/+356
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | You can now access a frame in a thread using: lldb.SBThread.frame[int] -> lldb.SBFrame object for a frame in a thread Where "int" is an integer index. You can also access a list object with all of the frames using: lldb.SBThread.frames => list() of lldb.SBFrame objects All SB objects that give out SBAddress objects have properties named "addr" lldb.SBInstructionList now has the following convenience accessors for len() and instruction access using an index: insts = lldb.frame.function.instructions for idx in range(len(insts)): print insts[idx] Instruction lists can also lookup an isntruction using a lldb.SBAddress as the key: pc_inst = lldb.frame.function.instructions[lldb.frame.addr] lldb.SBProcess now exposes: lldb.SBProcess.is_alive => BOOL Check if a process is exists and is alive lldb.SBProcess.is_running => BOOL check if a process is running (or stepping): lldb.SBProcess.is_running => BOOL check if a process is currently stopped or crashed: lldb.SBProcess.thread[int] => lldb.SBThreads for a given "int" zero based index lldb.SBProcess.threads => list() containing all lldb.SBThread objects in a process SBInstruction now exposes: lldb.SBInstruction.mnemonic => python string for instruction mnemonic lldb.SBInstruction.operands => python string for instruction operands lldb.SBInstruction.command => python string for instruction comment SBModule now exposes: lldb.SBModule.uuid => uuid.UUID(), an UUID object from the "uuid" python module lldb.SBModule.symbol[int] => lldb.Symbol, lookup symbol by zero based index lldb.SBModule.symbol[str] => list() of lldb.Symbol objects that match "str" lldb.SBModule.symbol[re] => list() of lldb.Symbol objecxts that match the regex lldb.SBModule.symbols => list() of all symbols in a module SBAddress objects can now access the current load address with the "lldb.SBAddress.load_addr" property. The current "lldb.target" will be used to try and resolve the load address. Load addresses can also be set using this accessor: addr = lldb.SBAddress() addd.load_addr = 0x123023 Then you can check the section and offset to see if the address got resolved. SBTarget now exposes: lldb.SBTarget.module[int] => lldb.SBModule from zero based module index lldb.SBTarget.module[str] => lldb.SBModule by basename or fullpath or uuid string lldb.SBTarget.module[uuid.UUID()] => lldb.SBModule whose UUID matches lldb.SBTarget.module[re] => list() of lldb.SBModule objects that match the regex lldb.SBTarget.modules => list() of all lldb.SBModule objects in the target SBSymbol now exposes: lldb.SBSymbol.name => python string for demangled symbol name lldb.SBSymbol.mangled => python string for mangled symbol name or None if there is none lldb.SBSymbol.type => lldb.eSymbolType enum value lldb.SBSymbol.addr => SBAddress object that represents the start address for this symbol (if there is one) lldb.SBSymbol.end_addr => SBAddress for the end address of the symbol (if there is one) lldb.SBSymbol.prologue_size => pythin int containing The size of the prologue in bytes lldb.SBSymbol.instructions => SBInstructionList containing all instructions for this symbol SBFunction now also has these new properties in addition to what is already has: lldb.SBFunction.addr => SBAddress object that represents the start address for this function lldb.SBFunction.end_addr => SBAddress for the end address of the function lldb.SBFunction.instructions => SBInstructionList containing all instructions for this function SBFrame now exposes the SBAddress for the frame: lldb.SBFrame.addr => SBAddress which is the section offset address for the current frame PC These are all in addition to what was already added. Documentation and website updates coming soon. llvm-svn: 149489
* Added a new convenience property on lldb.SBThread names "frames" which ↵Greg Clayton2012-02-012-26/+192
| | | | | | | | | | | | | always returns a complete list of all lldb.SBFrame objects: (lldb) script >>> frames = lldb.thread.frames >>> for frame in frames: ... print frame Also changed all of the "__repr__" methods to strip any trailing newline characters so we don't end up with entra newlines. llvm-svn: 149466
* Added a new class to the lldb python module:Greg Clayton2012-02-011-0/+184
| | | | | | | | | | | | | | | | | | | | | | | | | | | lldb.value() It it designed to be given a lldb.SBValue object and it allows natural use of a variable value: pt = lldb.value(lldb.frame.FindVariable("pt")) print pt print pt.x print pt.y pt = lldb.frame.FindVariable("rectangle_array") print rectangle_array[12] print rectangle_array[5].origin.x Note that array access works just fine and works on arrays or pointers: pt = lldb.frame.FindVariable("point_ptr") print point_ptr[5].y Also note that pointer child accesses are done using a "." instead of "->": print point_ptr.x llvm-svn: 149464
* Added fuzz testing for when we call API calls with an invalid object.Greg Clayton2012-01-311-0/+2
| | | | | | | | | We previously weren't catching that SBValue::Cast(...) would crash if we had an invalid (empty) SBValue object. Cleaned up the SBType API a bit. llvm-svn: 149447
* This commit provides a new default summary for Objective-C boolean ↵Enrico Granata2012-01-311-0/+15
| | | | | | variables, which shows YES or NO instead of the character value. A new category named objc is added to contain this summary provider. Any future Objective-C related formatters would probably fit here llvm-svn: 149388
* Removed an incorrectly added property from SBTarget.iGreg Clayton2012-01-291-3/+0
| | | | llvm-svn: 149192
* Added the ability to get the target triple, byte order and address byte sizeGreg Clayton2012-01-2916-0/+455
| | | | | | | from the SBTarget and SBModule interfaces. Also added many python properties for easier access to many things from many SB objects. llvm-svn: 149191
* <rdar://problem/10750012>Greg Clayton2012-01-271-8/+0
| | | | | | | | Remove a pseudo terminal master open and slave file descriptor that was being used for pythong stdin. It was not hooked up correctly and was causing file descriptor leaks. llvm-svn: 149098
* Patch from Enrico Granata that moves SBData related functions into the SBDataGreg Clayton2012-01-072-21/+46
| | | | | | | class instead of requiring a live process in order to be able to create useful SBData objects. llvm-svn: 147702
* http://llvm.org/bugs/show_bug.cgi?id=11619Johnny Chen2012-01-062-0/+172
| | | | | | | | Allow creating SBData values from arrays or primitives in Python Patch submitted by Enrico Granata. llvm-svn: 147639
* Add needed Clear methods.Jim Ingham2011-12-193-0/+9
| | | | | | <rdar://problem/10596340> llvm-svn: 146902
* Fix Python docstring for SBThread.GetStopDescription().Johnny Chen2011-12-191-0/+4
| | | | llvm-svn: 146890
OpenPOWER on IntegriCloud