Skip to content
  1. Feb 21, 2012
    • Greg Clayton's avatar
      Thread hardening part 3. Now lldb_private::Thread objects have std::weak_ptr · 1ac04c30
      Greg Clayton authored
      objects for the backlink to the lldb_private::Process. The issues we were
      running into before was someone was holding onto a shared pointer to a 
      lldb_private::Thread for too long, and the lldb_private::Process parent object
      would get destroyed and the lldb_private::Thread had a "Process &m_process"
      member which would just treat whatever memory that used to be a Process as a
      valid Process. This was mostly happening for lldb_private::StackFrame objects
      that had a member like "Thread &m_thread". So this completes the internal
      strong/weak changes.
      
      Documented the ExecutionContext and ExecutionContextRef classes so that our
      LLDB developers can understand when and where to use ExecutionContext and 
      ExecutionContextRef objects.
      
      llvm-svn: 151009
      1ac04c30
    • Enrico Granata's avatar
  2. Feb 20, 2012
  3. Feb 18, 2012
    • Greg Clayton's avatar
      The second part in thread hardening the internals of LLDB where we make · d9e416c0
      Greg Clayton authored
      the lldb_private::StackFrame objects hold onto a weak pointer to the thread
      object. The lldb_private::StackFrame objects the the most volatile objects
      we have as when we are doing single stepping, frames can often get lost or
      thrown away, only to be re-created as another object that still refers to the
      same frame. We have another bug tracking that. But we need to be able to 
      have frames no longer be able to get the thread when they are not part of
      a thread anymore, and this is the first step (this fix makes that possible
      but doesn't implement it yet).
      
      Also changed lldb_private::ExecutionContextScope to return shared pointers to
      all objects in the execution context to further thread harden the internals.
      
      llvm-svn: 150871
      d9e416c0
    • Sean Callanan's avatar
      Ignore the constness of the object pointer when · 5056ab04
      Sean Callanan authored
      fetching it.
      
      llvm-svn: 150861
      5056ab04
    • Enrico Granata's avatar
      making it so that the std::map test case does a better job at checking for... · d3e45fc3
      Enrico Granata authored
      making it so that the std::map test case does a better job at checking for interference between expression parser and synthetic children; plus being more verbose in the comments
      
      llvm-svn: 150854
      d3e45fc3
  4. Feb 17, 2012
    • Jim Ingham's avatar
      Remove unneeded includes. · ec1da844
      Jim Ingham authored
      llvm-svn: 150843
      ec1da844
    • 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
    • Enrico Granata's avatar
      reverting unwanted changes to scheme files with previous commit · 400d1f44
      Enrico Granata authored
      llvm-svn: 150785
      400d1f44
    • Enrico Granata's avatar
      Adding formatters for several useful Objective-C/Cocoa data types. The new... · 864e3e84
      Enrico Granata authored
      Adding formatters for several useful Objective-C/Cocoa data types. The new 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
      864e3e84
    • Greg Clayton's avatar
      Fixed an error with the 'G' packet on ARM when using the default GDB · 23a17953
      Greg Clayton authored
      register set where it could get an error when trying to restore the
      fake "f0" - "f7" 12 byte float regs.
      
      llvm-svn: 150781
      23a17953
    • Sean Callanan's avatar
      Added a new disassembler plugin, DisassemblerLLVMC, · 95e5c630
      Sean Callanan authored
      which uses the Disassembler.h interface to the LLVM
      disassemblers rather than the EnhancedDisassembly.h
      interface.  Disassembler.h is a better-maintained
      API and will be stabler in the long term.
      
      Currently the output from Disassembler.h does not
      provide for symbolic disassembly in all the places
      that the old disassembler did, so I have gated (and
      disabled) the disassembler.  It'll be easy to flip
      the switch later.
      
      In the meantime, to enable the new disassembler,
      uncomment "#define USE_NEW_DISASSEMBLER" in
      lldb.cpp.
      
      llvm-svn: 150772
      95e5c630
    • Johnny Chen's avatar
      memory read -f X doesn't print anything (lldb should warn when encountering an... · 3517d128
      Johnny Chen authored
      memory read -f X doesn't print anything (lldb should warn when encountering an unsupported byte size)
      Also add a test sequence for it.
      
      rdar://problem/10876841
      
      llvm-svn: 150766
      3517d128
  5. Feb 16, 2012
  6. Feb 15, 2012
    • Sean Callanan's avatar
      Stop finding bare symbols when we're explicitly · 3ae61794
      Sean Callanan authored
      told to look in a namespace.
      
      llvm-svn: 150590
      3ae61794
    • Enrico Granata's avatar
      adding a new test case for the SB formatters API · 1422d676
      Enrico Granata authored
      llvm-svn: 150559
      1422d676
    • Enrico Granata's avatar
      <rdar://problem/10062621> · 061858ce
      Enrico Granata authored
      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
      061858ce
    • Sean Callanan's avatar
      Previoously the expression parser had to rely on the · f673e769
      Sean Callanan authored
      JIT when printing the values of registers (e.g.,
      "expr $pc").  Now the expression parser can do this
      in the IR interpreter without running code in the
      inferior process.
      
      llvm-svn: 150554
      f673e769
  7. Feb 14, 2012
  8. Feb 13, 2012
  9. Feb 11, 2012
  10. Feb 10, 2012
    • Sean Callanan's avatar
      Extended function lookup to allow the user to · 9df05fbb
      Sean Callanan authored
      indicate whether inline functions are desired.
      This allows the expression parser, for instance,
      to filter out inlined functions when looking for
      functions it can call.
      
      llvm-svn: 150279
      9df05fbb
    • Sean Callanan's avatar
      Improved detection of object file types, moving · 49bce8ec
      Sean Callanan authored
      detection of kernels into the object file and
      adding a new category for raw binary images.
      Fixed all clients who previously searched for
      sections manually, making them use the object
      file's facilities instead.
      
      llvm-svn: 150272
      49bce8ec
    • Greg Clayton's avatar
      Fixed incorrect #include directives. · 1ada7bc0
      Greg Clayton authored
      llvm-svn: 150271
      1ada7bc0
    • Sean Callanan's avatar
      Fixed a bunch of ownership problems with the expression · 933693b6
      Sean Callanan authored
      parser.  Specifically:
      
      - ClangUserExpression now keeps weak pointers to the
        structures it needs and then locks them when needed.
        This ensures that they continue to be valid without
        leaking memory if the ClangUserExpression is long
        lived.
      
      - ClangExpressionDeclMap, instead of keeping a pointer
        to an ExecutionContext, now contains an
        ExecutionContext.  This prevents bugs if the pointer
        or its contents somehow become stale.  It also no
        longer requires that ExecutionContexts be passed
        into any function except its initialization function,
        since it can count on the ExecutionContext still
        being around.
      
      There's a lot of room for improvement (specifically,
      ClangExpressionDeclMap should also use weak pointers
      insetad of shared pointers) but this is an important
      first step that codifies assumptions that already
      existed in the code.
      
      llvm-svn: 150217
      933693b6
    • Enrico Granata's avatar
      fixing a macro name mismatch that was making our test case succeed for the... · 55031d28
      Enrico Granata authored
      fixing a macro name mismatch that was making our test case succeed for the wrong reason; plus a minor code change to the CPP side of the test which eases debugging efforts
      
      llvm-svn: 150213
      55031d28
Loading