History log of /external/lldb/include/lldb/API/SBData.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
36da2aa6dc5ad9994b638ed09eb81c44cc05540b 25-Jan-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13069948>

Major fixed to allow reading files that are over 4GB. The main problems were that the DataExtractor was using 32 bit offsets as a data cursor, and since we mmap all of our object files we could run into cases where if we had a very large core file that was over 4GB, we were running into the 4GB boundary.

So I defined a new "lldb::offset_t" which should be used for all file offsets.

After making this change, I enabled warnings for data loss and for enexpected implicit conversions temporarily and found a ton of things that I fixed.

Any functions that take an index internally, should use "size_t" for any indexes and also should return "size_t" for any sizes of collections.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@173463 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/API/SBData.h
7dd5c51fbab8384b18f20ecc125f9a1bb3c9bcb2 06-Feb-2012 Greg Clayton <gclayton@apple.com> Removed all of the "#ifndef SWIG" from the SB header files since we are using
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.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149853 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/API/SBData.h
a6b7e323caa2bbd1b2835dcce775340b27c13bf3 07-Jan-2012 Greg Clayton <gclayton@apple.com> Patch from Enrico Granata that moves SBData related functions into the SBData
class instead of requiring a live process in order to be able to create useful
SBData objects.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147702 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/API/SBData.h
9f074f0e030a74a3efd716a476b436f2d32bdf74 06-Jan-2012 Johnny Chen <johnny.chen@apple.com> http://llvm.org/bugs/show_bug.cgi?id=11619
Allow creating SBData values from arrays or primitives in Python

Patch submitted by Enrico Granata.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147639 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/API/SBData.h
23b8abbe214c252028f6e09f79169529c846409d 26-Sep-2011 Greg Clayton <gclayton@apple.com> Added more functionality to the public API to allow for better
symbolication. Also improved the SBInstruction API to allow
access to the instruction opcode name, mnemonics, comment and
instruction data.

Added the ability to edit SBLineEntry objects (change the file,
line and column), and also allow SBSymbolContext objects to be
modified (set module, comp unit, function, block, line entry
or symbol).

The SymbolContext and SBSymbolContext can now generate inlined
call stack infomration for symbolication much easier using the
SymbolContext::GetParentInlinedFrameInfo(...) and
SBSymbolContext::GetParentInlinedFrameInfo(...) methods.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140518 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/API/SBData.h
15ef51e3bd8229d3779f96e08b25b26182c91c6c 24-Sep-2011 Greg Clayton <gclayton@apple.com> Added the ability to get all section contents, or the section
contents starting at an offset (2 separate methods). This helps
the scripting interface stay more natural by allowing both from
Python.

Added the ability to dump data with address annotations when
call SBData::GetDescription().

Hooked up the SBSection to the __repr__ so you can print section
objects from within python.

Improved the dumping of symbols from python.

Fixed the .i interface references which were set to "Relative to this Group"
which somehow included Jim's "lldb-clean" root directory in the path. The
interfaces are now in a folder called "interfaces" withing the Xcode API
subfolder.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140451 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/API/SBData.h
3e8c25f62f92145b6fb699b379cbfe72b1245d4a 24-Sep-2011 Greg Clayton <gclayton@apple.com> Added to the public API to allow symbolication:
- New SBSection objects that are object file sections which can be accessed
through the SBModule classes. You can get the number of sections, get a
section at index, and find a section by name.
- SBSections can contain subsections (first find "__TEXT" on darwin, then
us the resulting SBSection to find "__text" sub section).
- Set load addresses for a SBSection in the SBTarget interface
- Set the load addresses of all SBSection in a SBModule in the SBTarget interface
- Add a new module the an existing target in the SBTarget interface
- Get a SBSection from a SBAddress object

This should get us a lot closer to being able to symbolicate using LLDB through
the public API.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140437 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/API/SBData.h
915448044bac6fdac22a33cc46697dcb771a8df2 06-Sep-2011 Enrico Granata <granata.enrico@gmail.com> Redesign of the interaction between Python and frozen objects:
- introduced two new classes ValueObjectConstResultChild and ValueObjectConstResultImpl: the first one is a ValueObjectChild obtained from
a ValueObjectConstResult, the second is a common implementation backend for VOCR and VOCRCh of method calls meant to read through pointers stored
in frozen objects ; now such reads transparently move from host to target as required
- as a consequence of the above, removed code that made target-memory copies of expression results in several places throughout LLDB, and also
removed code that enabled to recognize an expression result VO as such
- introduced a new GetPointeeData() method in ValueObject that lets you read a given amount of objects of type T from a VO
representing a T* or T[], and doing dereferences transparently
in private layer it returns a DataExtractor ; in public layer it returns an instance of a newly created lldb::SBData
- as GetPointeeData() does the right thing for both frozen and non-frozen ValueObject's, reimplemented ReadPointedString() to use it
en lieu of doing the raw read itself
- introduced a new GetData() method in ValueObject that lets you get a copy of the data that backs the ValueObject (for pointers,
this returns the address without any previous dereferencing steps ; for arrays it actually reads the whole chunk of memory)
in public layer this returns an SBData, just like GetPointeeData()
- introduced a new CreateValueFromData() method in SBValue that lets you create a new SBValue from a chunk of data wrapped in an SBData
the limitation to remember for this kind of SBValue is that they have no address: extracting the address-of for these objects (with any
of GetAddress(), GetLoadAddress() and AddressOf()) will return invalid values
- added several tests to check that "p"-ing objects (STL classes, char* and char[]) will do the right thing
Solved a bug where global pointers to global variables were not dereferenced correctly for display
New target setting "max-string-summary-length" gives the maximum number of characters to show in a string when summarizing it, instead of the hardcoded 128
Solved a bug where the summary for char[] and char* would not be shown if the ValueObject's were dumped via the "p" command
Removed m_pointers_point_to_load_addrs from ValueObject. Introduced a new m_address_type_of_children, which each ValueObject can set to tell the address type
of any pointers and/or references it creates. In the current codebase, this is load address most of the time (the only notable exception being file
addresses that generate file address children UNLESS we have a live process)
Updated help text for summary-string
Fixed an issue in STL formatters where std::stlcontainer::iterator would match the container's synthetic children providers
Edited the syntax and help for some commands to have proper argument types


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139160 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/API/SBData.h