Skip to content
  1. Apr 11, 2013
  2. Mar 28, 2013
    • Greg Clayton's avatar
      <rdar://problem/13521159> · 5160ce5c
      Greg Clayton authored
      LLDB is crashing when logging is enabled from lldb-perf-clang. This has to do with the global destructor chain as the process and its threads are being torn down.
      
      All logging channels now make one and only one instance that is kept in a global pointer which is never freed. This guarantees that logging can correctly continue as the process tears itself down.
      
      llvm-svn: 178191
      5160ce5c
  3. Mar 23, 2013
  4. Mar 19, 2013
    • Sean Callanan's avatar
      Refactored the expression parser so that the IR · 8dfb68e0
      Sean Callanan authored
      and the JITted code are managed by a standalone
      class that handles memory management itself.
      
      I have removed RecordingMemoryManager and
      ProcessDataAllocator, which filled similar roles
      and had confusing ownership, with a common class
      called IRExecutionUnit.  The IRExecutionUnit
      manages all allocations ever made for an expression
      and frees them when it goes away.  It also contains
      the code generator and can vend the Module for an
      expression to other clases.
      
      The end goal here is to make the output of the
      expression parser re-usable; that is, to avoid
      re-parsing when re-parsing isn't necessary.
      
      I've also cleaned up some code and used weak pointers
      in more places.  Please let me know if you see any
      leaks; I checked myself as well but I might have
      missed a case.
      
      llvm-svn: 177364
      8dfb68e0
  5. Mar 14, 2013
    • Greg Clayton's avatar
      <rdar://problem/13421412> · faac1118
      Greg Clayton authored
      Many "byte size" members and variables were using a mixture of uint32_t and size_t. Switching over to using uint64_t everywhere.
      
      llvm-svn: 177091
      faac1118
  6. Jan 02, 2013
  7. Nov 29, 2012
  8. Nov 26, 2012
  9. Nov 02, 2012
  10. Oct 12, 2012
  11. Oct 11, 2012
  12. Oct 08, 2012
  13. Sep 25, 2012
    • Sean Callanan's avatar
      Brought LLDB top-of-tree into sync with LLVM/Clang · 3d654b30
      Sean Callanan authored
      top-of-tree.  Removed all local patches and llvm.zip.
      
      The intent is that fron now on top-of-tree will
      always build against LLVM/Clang top-of-tree, and
      that problems building will be resolved as they
      occur.  Stable release branches of LLDB can be
      constructed as needed and linked to specific release
      branches of LLVM/Clang.
      
      llvm-svn: 164563
      3d654b30
  14. Jul 27, 2012
    • Sean Callanan's avatar
      Changed the IRForTarget pass to ensure that all · bad134ff
      Sean Callanan authored
      sel_getName() calls are generated for all Objective-C
      selectors before static literals are moved to the
      static allocation.  This prevents errors of the form
      
      Internal error [IRForTarget]: Couldn't change a static
      reference to an Objective-C selector to a dynamic
      reference
      
      <rdar://problem/11331906>
      
      llvm-svn: 160887
      bad134ff
  15. Jul 21, 2012
    • Sean Callanan's avatar
      Added a fix that allows newly-constructed objects · 6e6d4a62
      Sean Callanan authored
      to returned by expressions, by removing the
      __cxa_atexit call that would normally cause these
      objects to be destroyed.  This also prevents many
      errors of the form
      
      Couldn't rewrite one of the arguments of a function call
      error: Couldn't materialize struct: Structure hasn't been laid out yet
      
      <rdar://problem/11309402>
      
      llvm-svn: 160596
      6e6d4a62
  16. Jul 18, 2012
    • Greg Clayton's avatar
      <rdar://problem/10998370> · 5e0c5e81
      Greg Clayton authored
      Improved the error message when we can find a function in the current program by printing the demangled name.
      
      Also added the ability to create lldb_private::Mangled instances with a ConstString when we already have a ConstString for a mangled or demangled name. Also added the ability to call SetValue with a ConstString and also without a boolean to indicate if the string is mangled where we will now auto-detect if the string is mangled.
      
      llvm-svn: 160450
      5e0c5e81
  17. Jul 04, 2012
  18. Jun 09, 2012
    • Sean Callanan's avatar
      Minor fixes for ARM/iOS targets: · e3333d69
      Sean Callanan authored
      - On iOS, we select the "apcs-gnu" ABI to match
        what libraries expect.
      
      - Literals are now allocated at their preferred
        alignment, eliminating many alignment crashes.
      
      llvm-svn: 158236
      e3333d69
  19. Apr 26, 2012
    • Sean Callanan's avatar
      Made the IR interpreter move all floats, not just "wide" · 822944c9
      Sean Callanan authored
      ones, to its own constant pool.  This reflects the fact
      that the LLVM code generators for different targets move
      floats to their constant pools under varying conditions,
      and the JIT cannot (yet) be relied upon to relocate references to
      its constant pool correctly.
      
      llvm-svn: 155660
      822944c9
  20. Apr 24, 2012
    • Sean Callanan's avatar
      Fixed a crasher that occurs when an expression · 4538aa25
      Sean Callanan authored
      doesn't return a result.  If that expression can't
      be run in the current context (for example, if it
      uses a function and there is no running process)
      then we used to try to destroy the nonexistent
      result variable.  We now only destroy the result
      variable if we actually made one.
      
      llvm-svn: 155455
      4538aa25
  21. Feb 09, 2012
  22. Feb 04, 2012
    • Sean Callanan's avatar
      I have brought LLDB up-to-date with top of tree · 5b26f27f
      Sean Callanan authored
      LLVM/Clang.  This brings in several fixes, including:
      
      - Improvements in the Just-In-Time compiler's
        allocation of memory: the JIT now allocates
        memory in chunks of sections, improving its
        ability to generate relocations.  I have
        revamped the RecordingMemoryManager to reflect
        these changes, as well as to get the memory
        allocation and data copying out fo the
        ClangExpressionParser code.  Jim Grosbach wrote
        the updates to the JIT on the LLVM side.
      
      - A new ExternalASTSource interface to allow LLDB to
        report accurate structure layout information to
        Clang.  Previously we could only report the sizes
        of fields, not their offsets.  This meant that if
        data structures included field alignment
        directives, we could not communicate the necessary
        alignment to Clang and accesses to the data would
        fail.  Now we can (and I have update the relevant
        test case).  Thanks to Doug Gregor for implementing
        the Clang side of this fix.
      
      - The way Objective-C interfaces are completed by
        Clang has been made consistent with RecordDecls;
        with help from Doug Gregor and Greg Clayton I have
        ensured that this still works.
      
      - I have eliminated all local LLVM and Clang patches,
        committing the ones that are still relevant to LLVM
        and Clang as needed.
      
      I have tested the changes extensively locally, but
      please let me know if they cause any trouble for you.
      
      llvm-svn: 149775
      5b26f27f
  23. Jan 24, 2012
  24. Dec 22, 2011
  25. Dec 14, 2011
    • Sean Callanan's avatar
      This commit is the result of a general audit of · fc4f2fb0
      Sean Callanan authored
      the expression parser to locate instances where
      dyn_cast<>() and isa<>() are used on types, and
      replace them with getAs<>() as appropriate.
      
      The difference is that dyn_cast<>() and isa<>()
      are essentially LLVM/Clang's equivalent of RTTI
      -- that is, they try to downcast the object and
      return NULL if they cannot -- but getAs<>() can
      traverse typedefs to perform a semantic cast.
      
      llvm-svn: 146537
      fc4f2fb0
  26. Dec 08, 2011
    • Sean Callanan's avatar
      Added the ability to dereference an Objective-C object · 5780f9df
      Sean Callanan authored
      pointer to make the result of an expression.  LLDB now
      dumps the ivars of the Objective-C object and all of
      its parents.  This just required fixing a bug where we
      didn't distinguish between Objective-C object pointers
      and regular C-style pointers.
      
      Also added a testcase to verify that this continues to
      work.
      
      llvm-svn: 146164
      5780f9df
  27. Dec 03, 2011
    • Greg Clayton's avatar
      Added the ability for clients to grab a set of symbol table indexes and then · 1075acaf
      Greg Clayton authored
      add them to a fast lookup map. lldb_private::Symtab now export the following
      public typedefs:
      
      namespace lldb_private {
      
      	class Symtab {
      		typedef std::vector<uint32_t> IndexCollection;
      		typedef UniqueCStringMap<uint32_t> NameToIndexMap;
      	};
      }
      
      Clients can then find symbols by name and or type and end up with a 
      Symtab::IndexCollection that is filled with indexes. These indexes can then
      be put into a name to index lookup map and control if the mangled and 
      demangled names get added to the map:
      
      bool add_demangled = true;
      bool add_mangled = true;
      Symtab::NameToIndexMap name_to_index;
      symtab->AppendSymbolNamesToMap (indexes, add_demangled, add_mangled, name_to_index).
      
      This can be repeated as many times as needed to get a lookup table that
      you are happy with, and then this can be sorted:
      
      name_to_index.Sort();
      
      Now name lookups can be done using a subset of the symbols you extracted from
      the symbol table. This is currently being used to extract objective C types
      from object files when there is no debug info in SymbolFileSymtab.
      
      Cleaned up how the objective C types were being vended to be more efficient
      and fixed some errors in the regular expression that was being used.
      
      llvm-svn: 145777
      1075acaf
  28. Dec 01, 2011
    • Sean Callanan's avatar
      Made symbol lookup in the expression parser more · 947ccc73
      Sean Callanan authored
      robust:
      
      - Now a client can specify what kind of symbols
        are needed; notably, this allows looking up
        Objective-C class symbols specifically.
      
      - In the class of symbols being looked up, if
        one is non-NULL and others are NULL, LLDB now
        prefers the non-NULL one.
      
      llvm-svn: 145554
      947ccc73
  29. Nov 19, 2011
    • Sean Callanan's avatar
      Pulled in a new revision of LLVM/Clang and added · 7f27d604
      Sean Callanan authored
      several patches.  These patches fix a problem
      where templated types were not being completed the
      first time they were used, and fix a variety of
      minor issues I discovered while fixing that problem.
      
      One of the previous local patches was resolved in
      the most recent Clang, so I removed it.  The others
      will be removed in due course.
      
      llvm-svn: 144984
      7f27d604
  30. Nov 18, 2011
    • Sean Callanan's avatar
      This commit completes the rearchitecting of ClangASTSource · 00f43622
      Sean Callanan authored
      to allow variables in the persistent variable store to know
      how to complete themselves from debug information.  That
      fixes a variety of bugs during dematerialization of 
      expression results and also makes persistent variable and
      result variables ($foo, $4, ...) more useful.
      
      I have also added logging improvements that make it much
      easier to figure out how types are moving from place to 
      place, and made some checking a little more aggressive.
      
      The commit includes patches to Clang which are currently being
      integrated into Clang proper; once these fixes are in Clang
      top-of-tree, these patches will be removed.  The patches don't
      fix API; rather, they fix some internal bugs in Clang's 
      ASTImporter that were exposed when LLDB was moving types from
      place to place multiple times.
      
      llvm-svn: 144969
      00f43622
  31. Nov 16, 2011
    • Sean Callanan's avatar
      Two fixes for Objetive-C methods that return struct · a6cbf06d
      Sean Callanan authored
      types.  First, I added handling for the memset intrinsic
      in the IR, which is used to zero out the returned struct.
      Second, I fixed the object-checking instrumentation
      to objc_msgSend_stret, and generally tightened up how
      the object-checking functions get inserted.
      
      llvm-svn: 144741
      a6cbf06d
  32. Nov 15, 2011
  33. Nov 02, 2011
    • Sean Callanan's avatar
      Added functionality to call Objective-C class methods · fc89c142
      Sean Callanan authored
      correctly, and added a testcase to check that it works.
      
      The main problem here is that Objective-C class method
      selectors are external references stored in a special
      data structure in the LLVM IR module for an expression.
      I just had to extract them and ensure that the real
      class object locations were properly resolved.
      
      llvm-svn: 143520
      fc89c142
  34. Nov 01, 2011
  35. Oct 31, 2011
  36. Oct 25, 2011
    • Sean Callanan's avatar
      Improved handling of static data in the expression · c70ed46d
      Sean Callanan authored
      parser.  Now expression like the following work as
      expected:
      
      -
      (lldb) expr struct { int a; int b; } $blah = { 10, 20 }
      <no result>
      (lldb) expr $blah
      (<anonymous struct at Parse:6:5>) $blah = {
        (int) a = 10
        (int) b = 20
      }
      -
      
      Now the IRForTarget subsystem knows how to handle
      static initializers of various composite types.
      
      Also removed an unnecessary parameter from
      ClangExpressionDeclMap::GetFunctionInfo.
      
      llvm-svn: 142936
      c70ed46d
  37. Oct 22, 2011
  38. Oct 21, 2011
Loading