Skip to content
  1. Oct 17, 2012
  2. May 08, 2012
    • Enrico Granata's avatar
      <rdar://problem/11239650> Fixing a bug where the SetValueFromCString() method... · 07a4ac22
      Enrico Granata authored
      <rdar://problem/11239650> Fixing a bug where the SetValueFromCString() method failed to operate on dynamic values. The fix consists in making the set operation fall through to the parent. We only actually allow this if the dynamic value is at a 0-offset from the parent, or the new value is 0. Other scenarios would need agreement on the actual meaning of the set operation (do we keep offsetting? do we just assume the user knows what they are doing?) so we prevent them, and let the expression parser deal with the complexity
      
      llvm-svn: 156422
      07a4ac22
  3. Mar 27, 2012
    • Greg Clayton's avatar
      <rdar://problem/11113279> · 84db9105
      Greg Clayton authored
      Fixed type lookups to "do the right thing". Prior to this fix, looking up a type using "foo::bar" would result in a type list that contains all types that had "bar" as a basename unless the symbol file was able to match fully qualified names (which our DWARF parser does not). 
      
      This fix will allow type matches to be made based on the basename and then have the types that don't match filtered out. Types by name can be fully qualified, or partially qualified with the new "bool exact_match" parameter to the Module::FindTypes() method.
      
      This fixes some issue that we discovered with dynamic type resolution as well as improves the overall type lookups in LLDB.
      
      llvm-svn: 153482
      84db9105
  4. Feb 24, 2012
    • Greg Clayton's avatar
      <rdar://problem/10103468> · e72dfb32
      Greg Clayton authored
      I started work on being able to add symbol files after a debug session
      had started with a new "target symfile add" command and quickly ran into
      problems with stale Address objects in breakpoint locations that had 
      lldb_private::Section pointers into modules that had been removed or 
      replaced. This also let to grabbing stale modules from those sections. 
      So I needed to thread harded the Address, Section and related objects.
      
      To do this I modified the ModuleChild class to now require a ModuleSP
      on initialization so that a weak reference can created. I also changed
      all places that were handing out "Section *" to have them hand out SectionSP.
      All ObjectFile, SymbolFile and SymbolVendors were inheriting from ModuleChild
      so all of the find plug-in, static creation function and constructors now
      require ModuleSP references instead of Module *. 
      
      Address objects now have weak references to their sections which can
      safely go stale when a module gets destructed. 
      
      This checkin doesn't complete the "target symfile add" command, but it
      does get us a lot clioser to being able to do such things without a high
      risk of crashing or memory corruption.
      
      llvm-svn: 151336
      e72dfb32
  5. Feb 23, 2012
    • Sean Callanan's avatar
      Added support for looking up the complete type for · 7277284f
      Sean Callanan authored
      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.
      
      llvm-svn: 151214
      7277284f
  6. Feb 17, 2012
    • Greg Clayton's avatar
      This checking is part one of trying to add some threading safety to our · cc4d0146
      Greg Clayton authored
      internals. The first part of this is to use a new class:
      
      lldb_private::ExecutionContextRef
      
      This class holds onto weak pointers to the target, process, thread and frame
      and it also contains the thread ID and frame Stack ID in case the thread and
      frame objects go away and come back as new objects that represent the same
      logical thread/frame. 
      
      ExecutionContextRef objcets have accessors to access shared pointers for
      the target, process, thread and frame which might return NULL if the backing
      object is no longer available. This allows for references to persistent program
      state without needing to hold a shared pointer to each object and potentially
      keeping that object around for longer than it needs to be. 
      
      You can also "Lock" and ExecutionContextRef (which contains weak pointers)
      object into an ExecutionContext (which contains strong, or shared pointers)
      with code like
      
      ExecutionContext exe_ctx (my_obj->GetExectionContextRef().Lock());
      
      llvm-svn: 150801
      cc4d0146
  7. Feb 04, 2012
    • Greg Clayton's avatar
      Convert all python objects in our API to use overload the __str__ method · 81e871ed
      Greg Clayton authored
      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
      81e871ed
  8. Feb 03, 2012
  9. Sep 22, 2011
    • Greg Clayton's avatar
      Converted the lldb_private::Process over to use the intrusive · c14ee32d
      Greg Clayton authored
      shared pointers.
      
      Changed the ExecutionContext over to use shared pointers for
      the target, process, thread and frame since these objects can
      easily go away at any time and any object that was holding onto
      an ExecutionContext was running the risk of using a bad object.
      
      Now that the shared pointers for target, process, thread and
      frame are just a single pointer (they all use the instrusive
      shared pointers) the execution context is much safer and still
      the same size. 
      
      Made the shared pointers in the the ExecutionContext class protected
      and made accessors for all of the various ways to get at the pointers,
      references, and shared pointers.
      
      llvm-svn: 140298
      c14ee32d
  10. Aug 03, 2011
  11. Aug 02, 2011
    • Enrico Granata's avatar
      Fixed a bug where a variable could not be formatted in a summary if its... · c3e320a7
      Enrico Granata authored
      Fixed a bug where a variable could not be formatted in a summary if its datatype already had a custom format
      Fixed a bug where Objective-C variables coming out of the expression parser could crash the Python synthetic providers:
       - expression parser output has a "frozen data" component, which is a byte-exact copy of the value (in host memory),
         if trying to read into memory based on the host address, LLDB would crash. we are now passing the correct (target)
         pointer to the Python code
      Objective-C "id" variables are now formatted according to their dynamic type, if the -d option to frame variable is used:
       - Code based on the Objective-C 2.0 runtime is used to obtain this information without running code on the target
      
      llvm-svn: 136695
      c3e320a7
  12. Jul 29, 2011
    • Enrico Granata's avatar
      Public API changes: · 6f3533fb
      Enrico Granata authored
       - Completely new implementation of SBType
       - Various enhancements in several other classes
      Python synthetic children providers for std::vector<T>, std::list<T> and std::map<K,V>:
       - these return the actual elements into the container as the children of the container
       - basic template name parsing that works (hopefully) on both Clang and GCC
       - find them in examples/synthetic and in the test suite in functionalities/data-formatter/data-formatter-python-synth
      New summary string token ${svar :
       - the syntax is just the same as in ${var but this new token lets you read the values
         coming from the synthetic children provider instead of the actual children
       - Python providers above provide a synthetic child len that returns the number of elements
         into the container
      Full bug fix for the issue in which getting byte size for a non-complete type would crash LLDB
      Several other fixes, including:
       - inverted the order of arguments in the ClangASTType constructor
       - EvaluationPoint now only returns SharedPointer's to Target and Process
       - the help text for several type subcommands now correctly indicates argument-less options as such
      
      llvm-svn: 136504
      6f3533fb
  13. Jul 07, 2011
    • Greg Clayton's avatar
      Added "target variable" command that allows introspection of global · 644247c1
      Greg Clayton authored
      variables prior to running your binary. Zero filled sections now get
      section data correctly filled with zeroes when Target::ReadMemory
      reads from the object file section data.
      
      Added new option groups and option values for file lists. I still need
      to hook up all of the options to "target variable" to allow more complete
      introspection by file and shlib.
      
      Added the ability for ValueObjectVariable objects to be created with
      only the target as the execution context. This allows them to be read
      from the object files through Target::ReadMemory(...). 
      
      Added a "virtual Module * GetModule()" function to the ValueObject
      class. By default it will look to the parent variable object and
      return its module. The module is needed when we have global variables
      that have file addresses (virtual addresses that are specific to
      module object files) and in turn allows global variables to be displayed
      prior to running.
      
      Removed all of the unused proxy object support that bit rotted in 
      lldb_private::Value.
      
      Replaced a lot of places that used "FileSpec::Compare (lhs, rhs) == 0" code
      with the more efficient "FileSpec::Equal (lhs, rhs)".
      
      Improved logging in GDB remote plug-in.
      
      llvm-svn: 134579
      644247c1
  14. Jul 02, 2011
    • Enrico Granata's avatar
      several improvements to "type summary": · 0a3958e0
      Enrico Granata authored
       - type names can now be regular expressions (exact matching is done first, and is faster)
       - integral (and floating) types can be printed as bitfields, i.e. ${var[low-high]} will extract bits low thru high of the value and print them
       - array subscripts are supported, both for arrays and for pointers. the syntax is ${*var[low-high]}, or ${*var[]} to print the whole array (the latter only works for statically sized arrays)
       - summary is now printed by default when a summary string references a variable. if that variable's type has no summary, value is printed instead. to force value, you can use %V as a format specifier
       - basic support for ObjectiveC:
        - ObjectiveC inheritance chains are now walked through
        - %@ can be specified as a summary format, to print the ObjectiveC runtime description for an object
       - some bug fixes
      
      llvm-svn: 134293
      0a3958e0
  15. Jun 30, 2011
  16. May 31, 2011
  17. May 30, 2011
  18. May 04, 2011
  19. May 02, 2011
  20. Apr 23, 2011
  21. Apr 16, 2011
    • Jim Ingham's avatar
      Add support for "dynamic values" for C++ classes. This currently only works... · 78a685aa
      Jim Ingham authored
      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.
      
      llvm-svn: 129623
      78a685aa
Loading