History log of /external/lldb/include/lldb/Core/ValueObjectConstResult.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
52f792329be5db8e38961350589e97e8f2823acd 12-Jul-2013 Greg Clayton <gclayton@apple.com> Huge change to clean up types.

A long time ago we start with clang types that were created by the symbol files and there were many functions in lldb_private::ClangASTContext that helped. Later we create ClangASTType which contains a clang::ASTContext and an opauque QualType, but we didn't switch over to fully using it. There were a lot of places where we would pass around a raw clang_type_t and also pass along a clang::ASTContext separately. This left room for error.

This checkin change all type code over to use ClangASTType everywhere and I cleaned up the interfaces quite a bit. Any code that was in ClangASTContext that was type related, was moved over into ClangASTType. All code that used these types was switched over to use all of the new goodness.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@186130 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/ValueObjectConstResult.h
fe6dc6e241c52822710380cec0931351a1d7b2d3 14-Mar-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13421412>

Many "byte size" members and variables were using a mixture of uint32_t and size_t. Switching over to using uint64_t everywhere.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@177091 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/ValueObjectConstResult.h
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/Core/ValueObjectConstResult.h
0d0f56d5b81afb0f3d2e71c53947658a4c667f35 07-Jul-2012 Greg Clayton <gclayton@apple.com> Make const result value objects able to return dynamic types.

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.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@159883 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/ValueObjectConstResult.h
931acecd4e3af534028936431dc0f75a9fd6eb02 23-Feb-2012 Sean Callanan <scallanan@apple.com> Added support for looking up the complete type for
Objective-C classes. This allows LLDB to find
ivars declared in class extensions in modules other
than where the debugger is currently stopped (we
already supported this when the debugger was
stopped in the same module as the definition).

This involved the following main changes:

- The ObjCLanguageRuntime now knows how to hunt
for the authoritative version of an Objective-C
type. It looks for the symbol indicating a
definition, and then gets the type from the
module containing that symbol.

- ValueObjects now report their type with a
potential override, and the override is set if
the type of the ValueObject is an Objective-C
class or pointer type that is defined somewhere
other than the original reported type. This
means that "frame variable" will always use the
complete type if one is available.

- The ClangASTSource now looks for the complete
type when looking for ivars. This means that
"expr" will always use the complete type if one
is available.

- I added a testcase that verifies that both
"frame variable" and "expr" work.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151214 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/ValueObjectConstResult.h
1586d9720002e407a3a097baf302de5fa4ca9c1b 17-Dec-2011 Jim Ingham <jingham@apple.com> Add the ability to capture the return value in a thread's stop info, and print it
as part of the thread format output.
Currently this is only done for the ThreadPlanStepOut.
Add a convenience API ABI::GetReturnValueObject.
Change the ValueObject::EvaluationPoint to BE an ExecutionContextScope, rather than
trying to hand out one of its subsidiary object's pointers. That way this will always
be good.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@146806 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/ValueObjectConstResult.h
dfafa141aa9d0dd0596bf08b3f941be8c308316d 17-Dec-2011 Johnny Chen <johnny.chen@apple.com> http://llvm.org/bugs/show_bug.cgi?id=11588
valobj.AddressOf() returns None when an address is expected in a SyntheticChildrenProvider

Patch from Enrico Granata:

The problem was that the frozen object created by the expression parser was a copy of the contents of the StgClosure, rather than a pointer to it. Thus, the expression parser was correctly computing the result of the arithmetic&cast operation along with its address, but only saving it in the live object. This meant that the frozen copy acted as an address-less variable, hence the problem.

The fix attached to this email lets the expression parser store the "live address" in the frozen copy of the address when the object is built without a valid address of its own.
Doing so, along with delegating ValueObjectConstResult to calculate its own address when necessary, solves the issue. I have also added a new test case to check for regressions in this area, and checked that existing test cases pass correctly.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@146768 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/ValueObjectConstResult.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/Core/ValueObjectConstResult.h
10de7d1db3ec782ea2ccda1f39c0a40b9c301594 04-May-2011 Jim Ingham <jingham@apple.com> Change "frame var" over to using OptionGroups (and thus the OptionGroupVariableObjectDisplay).
Change the boolean "use_dynamic" over to a tri-state, no-dynamic, dynamic-w/o running target,
and dynamic with running target.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130832 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/ValueObjectConstResult.h
47da810225d8674eb9158bcf5f1f5b847cbaeedf 23-Apr-2011 Jim Ingham <jingham@apple.com> Fix up how the ValueObjects manage their life cycle so that you can hand out a shared
pointer to a ValueObject or any of its dependent ValueObjects, and the whole cluster will
stay around as long as that shared pointer stays around.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130035 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/ValueObjectConstResult.h
e41494a9092e15192012a5e0a8a1ffd66c70b8bb 16-Apr-2011 Jim Ingham <jingham@apple.com> Add support for "dynamic values" for C++ classes. This currently only works for "frame var" and for the
expressions that are simple enough to get passed to the "frame var" underpinnings. The parser code will
have to be changed to also query for the dynamic types & offsets as it is looking up variables.

The behavior of "frame var" is controlled in two ways. You can pass "-d {true/false} to the frame var
command to get the dynamic or static value of the variables you are printing.

There's also a general setting:

target.prefer-dynamic-value (boolean) = 'true'

which is consulted if you call "frame var" without supplying a value for the -d option.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129623 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/ValueObjectConstResult.h
fa3a16a2ea380ef38388ebe323817bd1b32c20cd 31-Mar-2011 Jim Ingham <jingham@apple.com> Convert ValueObject to explicitly maintain the Execution Context in which they were created, and then use that when they update themselves. That means all the ValueObject evaluate me type functions that used to require a Frame object now do not. I didn't remove the SBValue API's that take this now useless frame, but I added ones that don't require the frame, and marked the SBFrame taking ones as deprecated.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128593 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/ValueObjectConstResult.h
b344843f75ef893762c93fd0a22d2d45712ce74d 24-Mar-2011 Greg Clayton <gclayton@apple.com> Fixed the LLDB build so that we can have private types, private enums and
public types and public enums. This was done to keep the SWIG stuff from
parsing all sorts of enums and types that weren't needed, and allows us to
abstract our API better.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128239 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/ValueObjectConstResult.h
b01000fd063629facd45044f137446fb748ee179 17-Jan-2011 Greg Clayton <gclayton@apple.com> A few of the issue I have been trying to track down and fix have been due to
the way LLDB lazily gets complete definitions for types within the debug info.
When we run across a class/struct/union definition in the DWARF, we will only
parse the full definition if we need to. This works fine for top level types
that are assigned directly to variables and arguments, but when we have a
variable with a class, lets say "A" for this example, that has a member:
"B *m_b". Initially we don't need to hunt down a definition for this class
unless we are ever asked to do something with it ("expr m_b->getDecl()" for
example). With my previous approach to lazy type completion, we would be able
to take a "A *a" and get a complete type for it, but we wouldn't be able to
then do an "a->m_b->getDecl()" unless we always expanded all types within a
class prior to handing out the type. Expanding everything is very costly and
it would be great if there were a better way.

A few months ago I worked with the llvm/clang folks to have the
ExternalASTSource class be able to complete classes if there weren't completed
yet:

class ExternalASTSource {
....

virtual void
CompleteType (clang::TagDecl *Tag);

virtual void
CompleteType (clang::ObjCInterfaceDecl *Class);
};

This was great, because we can now have the class that is producing the AST
(SymbolFileDWARF and SymbolFileDWARFDebugMap) sign up as external AST sources
and the object that creates the forward declaration types can now also
complete them anywhere within the clang type system.

This patch makes a few major changes:
- lldb_private::Module classes now own the AST context. Previously the TypeList
objects did.
- The DWARF parsers now sign up as an external AST sources so they can complete
types.
- All of the pure clang type system wrapper code we have in LLDB (ClangASTContext,
ClangASTType, and more) can now be iterating through children of any type,
and if a class/union/struct type (clang::RecordType or ObjC interface)
is found that is incomplete, we can ask the AST to get the definition.
- The SymbolFileDWARFDebugMap class now will create and use a single AST that
all child SymbolFileDWARF classes will share (much like what happens when
we have a complete linked DWARF for an executable).

We will need to modify some of the ClangUserExpression code to take more
advantage of this completion ability in the near future. Meanwhile we should
be better off now that we can be accessing any children of variables through
pointers and always be able to resolve the clang type if needed.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123613 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/ValueObjectConstResult.h
427f290ff96f3ab9f2cf3a1af7001d2c560424c7 14-Dec-2010 Greg Clayton <gclayton@apple.com> Modified LLDB expressions to not have to JIT and run code just to see variable
values or persistent expression variables. Now if an expression consists of
a value that is a child of a variable, or of a persistent variable only, we
will create a value object for it and make a ValueObjectConstResult from it to
freeze the value (for program variables only, not persistent variables) and
avoid running JITed code. For everything else we still parse up and JIT code
and run it in the inferior.

There was also a lot of clean up in the expression code. I made the
ClangExpressionVariables be stored in collections of shared pointers instead
of in collections of objects. This will help stop a lot of copy constructors on
these large objects and also cleans up the code considerably. The persistent
clang expression variables were moved over to the Target to ensure they persist
across process executions.

Added the ability for lldb_private::Target objects to evaluate expressions.
We want to evaluate expressions at the target level in case we aren't running
yet, or we have just completed running. We still want to be able to access the
persistent expression variables between runs, and also evaluate constant
expressions.

Added extra logging to the dynamic loader plug-in for MacOSX. ModuleList objects
can now dump their contents with the UUID, arch and full paths being logged with
appropriate prefix values.

Thread hardened the Communication class a bit by making the connection auto_ptr
member into a shared pointer member and then making a local copy of the shared
pointer in each method that uses it to make sure another thread can't nuke the
connection object while it is being used by another thread.

Added a new file to the lldb/test/load_unload test that causes the test a.out file
to link to the libd.dylib file all the time. This will allow us to test using
the DYLD_LIBRARY_PATH environment variable after moving libd.dylib somewhere else.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121745 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/ValueObjectConstResult.h
d171972ecc7788bdb02d3e81420a24841e09a2bf 05-Oct-2010 Greg Clayton <gclayton@apple.com> Added the notion that a value object can be constant by adding:
bool ValueObject::GetIsConstant() const;
void ValueObject::SetIsConstant();

This will stop anything from being re-evaluated within the value object so
that constant result value objects can maintain their frozen values without
anything being updated or changed within the value object.

Made it so the ValueObjectConstResult can be constructed with an
lldb_private::Error object to allow for expression results to have errors.

Since ValueObject objects contain error objects, I changed the expression
evaluation in ClangUserExpression from

static Error
ClangUserExpression::Evaluate (ExecutionContext &exe_ctx,
const char *expr_cstr,
lldb::ValueObjectSP &result_valobj_sp);

to:

static lldb::ValueObjectSP
Evaluate (ExecutionContext &exe_ctx, const char *expr_cstr);

Even though expression parsing is borked right now (pending fixes coming from
Sean Callanan), I filled in the implementation for:

SBValue SBFrame::EvaluateExpression (const char *expr);

Modified all expression code to deal with the above changes.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115589 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/include/lldb/Core/ValueObjectConstResult.h
66ed2fbeaf588fe4105a1305f7e956dcf9fbe299 05-Oct-2010 Greg Clayton <gclayton@apple.com> Added a new ValueObject type that will be used to freeze dry expression
results. The clang opaque type for the expression result will be added to the
Target's ASTContext, and the bytes will be stored in a DataBuffer inside
the new object. The class is named: ValueObjectConstResult

Now after an expression is evaluated, we can get a ValueObjectSP back that
contains a ValueObjectConstResult object.

Relocated the value object dumping code into a static function within
the ValueObject class instead of being in the CommandObjectFrame.cpp file
which is what contained the code to dump variables ("frame variables").




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