Skip to content
  1. Jan 06, 2012
  2. Apr 23, 2011
  3. Apr 11, 2011
  4. Mar 31, 2011
    • Jim Ingham's avatar
      Convert ValueObject to explicitly maintain the Execution Context in which they... · 6035b67d
      Jim Ingham authored
      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.
      
      llvm-svn: 128593
      6035b67d
  5. Mar 24, 2011
  6. Jan 13, 2011
    • Sean Callanan's avatar
      Implemented a major overhaul of the way variables are handled · 92adcac9
      Sean Callanan authored
      by LLDB.  Instead of being materialized into the input structure
      passed to the expression, variables are left in place and pointers
      to them are materialzied into the structure.  Variables not resident
      in memory (notably, registers) get temporary memory regions allocated
      for them.
      
      Persistent variables are the most complex part of this, because they
      are made in various ways and there are different expectations about
      their lifetime.  Persistent variables now have flags indicating their
      status and what the expectations for longevity are.  They can be
      marked as residing in target memory permanently -- this is the
      default for result variables from expressions entered on the command
      line and for explicitly declared persistent variables (but more on
      that below).  Other result variables have their memory freed.
      
      Some major improvements resulting from this include being able to
      properly take the address of variables, better and cleaner support
      for functions that return references, and cleaner C++ support in
      general.  One problem that remains is the problem of explicitly
      declared persistent variables; I have not yet implemented the code
      that makes references to them into indirect references, so currently
      materialization and dematerialization of these variables is broken.
      
      llvm-svn: 123371
      92adcac9
  7. Dec 14, 2010
    • Greg Clayton's avatar
      Modified LLDB expressions to not have to JIT and run code just to see variable · 8b2fe6dc
      Greg Clayton authored
      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.
      
      llvm-svn: 121745
      8b2fe6dc
  8. Nov 30, 2010
  9. Nov 13, 2010
    • Greg Clayton's avatar
      Modified the lldb_private::Type clang type resolving code to handle three · 526e5afb
      Greg Clayton authored
      cases when getting the clang type:
      - need only a forward declaration
      - need a clang type that can be used for layout (members and args/return types)
      - need a full clang type
      
      This allows us to partially parse the clang types and be as lazy as possible.
      The first case is when we just need to declare a type and we will complete it
      later. The forward declaration happens only for class/union/structs and enums.
      The layout type allows us to resolve the full clang type _except_ if we have
      any modifiers on a pointer or reference (both R and L value). In this case
      when we are adding members or function args or return types, we only need to
      know how the type will be laid out and we can defer completing the pointee
      type until we later need it. The last type means we need a full definition for
      the clang type.
      
      Did some renaming of some enumerations to get rid of the old "DC" prefix (which
      stands for DebugCore which is no longer around).
      
      Modified the clang namespace support to be almost ready to be fed to the
      expression parser. I made a new ClangNamespaceDecl class that can carry around
      the AST and the namespace decl so we can copy it into the expression AST. I
      modified the symbol vendor and symbol file plug-ins to use this new class.
      
      llvm-svn: 118976
      526e5afb
  10. Oct 16, 2010
    • Greg Clayton's avatar
      Made many ConstString functions inlined in the header file. · 7b462cc1
      Greg Clayton authored
      Changed all of our synthesized "___clang" functions, types and variables
      that get used in expressions over to have a prefix of "$_lldb". Now when we
      do name lookups we can easily switch off of the first '$' character to know
      if we should look through only our internal (when first char is '$') stuff,
      or when we should look through program variables, functions and types.
      
      Converted all of the clang expression code over to using "const ConstString&" 
      values for names instead of "const char *" since there were many places that
      were converting the "const char *" names into ConstString names and them
      throwing them away. We now avoid making a lot of ConstString conversions and
      benefit from the quick comparisons in a few extra spots.
      
      Converted a lot of code from LLVM coding conventions into LLDB coding 
      conventions.
      
      llvm-svn: 116634
      7b462cc1
  11. Oct 05, 2010
    • Greg Clayton's avatar
      Added a new ValueObject type that will be used to freeze dry expression · 1d3afba3
      Greg Clayton authored
      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").
      
      llvm-svn: 115578
      1d3afba3
  12. Oct 01, 2010
  13. Sep 30, 2010
  14. Sep 29, 2010
    • Greg Clayton's avatar
      Fixed the forward declaration issue that was present in the DWARF parser after · 1be10fca
      Greg Clayton authored
      adding methods to C++ and objective C classes. In order to make methods, we
      need the function prototype which means we need the arguments. Parsing these
      could cause a circular reference that caused an  assertion.
      
      Added a new typedef for the clang opaque types which are just void pointers:
      lldb::clang_type_t. This appears in lldb-types.h.
      
      This was fixed by enabling struct, union, class, and enum types to only get
      a forward declaration when we make the clang opaque qual type for these
      types. When they need to actually be resolved, lldb_private::Type will call
      a new function in the SymbolFile protocol to resolve a clang type when it is
      not fully defined (clang::TagDecl::getDefinition() returns NULL). This allows
      us to be a lot more lazy when parsing clang types and keeps down the amount
      of data that gets parsed into the ASTContext for each module. 
      
      Getting the clang type from a "lldb_private::Type" object now takes a boolean
      that indicates if a forward declaration is ok:
      
          clang_type_t lldb_private::Type::GetClangType (bool forward_decl_is_ok);
          
      So function prototypes that define parameters that are "const T&" can now just
      parse the forward declaration for type 'T' and we avoid circular references in
      the type system.
      
      llvm-svn: 115012
      1be10fca
  15. Sep 28, 2010
  16. Sep 13, 2010
    • Sean Callanan's avatar
      Bugfixes to the expression parser. Fixes include: · 9e6ed53e
      Sean Callanan authored
       - If you put a semicolon at the end of an expression,
         this no longer causes the expression parser to
         error out.  This was a two-part fix: first,
         ClangExpressionDeclMap::Materialize now handles
         an empty struct (such as when there is no return
         value); second, ASTResultSynthesizer walks backward
         from the end of the ASTs until it reaches something
         that's not a NullStmt.
      
       - ClangExpressionVariable now properly byte-swaps when
         printing itself.
      
       - ClangUtilityFunction now cleans up after itself when
         it's done compiling itself.
      
       - Utility functions can now use external functions just
         like user expressions.
      
       - If you end your expression with a statement that does
         not return a value, the expression now runs correctly
         anyway.
      
      Also, added the beginnings of an Objective-C object
      validator function, which is neither installed nor used
      as yet.
      
      llvm-svn: 113789
      9e6ed53e
  17. Aug 30, 2010
  18. Aug 20, 2010
    • Sean Callanan's avatar
      First step of refactoring variable handling in the · d0ef0eff
      Sean Callanan authored
      expression parser.  There shouldn't be four separate
      classes encapsulating a variable.
      
      ClangExpressionVariable is now meant to be the
      container for all variable information.  It has
      several optional components that hold data for
      different subsystems.
      
      ClangPersistentVariable has been removed; we now
      use ClangExpressionVariable instead.
      
      llvm-svn: 111600
      d0ef0eff
  19. Aug 14, 2010
  20. Jun 08, 2010
Loading