Skip to content
  1. Dec 21, 2012
  2. Dec 11, 2012
    • Sean Callanan's avatar
      Fixed the IRInterpreter's handling of "this" and · 496970f6
      Sean Callanan authored
      "self" when those pointers are in registers.
      Previously in this case the IRInterpreter would
      handle them just as if the user had typed in
      "$rdi", which isn't safe because $rdi is passed
      in through the argument struct.
      
      Now we correctly break out all three cases (i.e.,
      normal variables in registers, $reg, and this/self),
      and handle them in a way that's a little bit easier
      to read and change.
      
      This results in more accurate printing of "this" and
      "self" pointers all around.  I have strengthened the
      optimized-code test case for Objective-C to ensure
      that we catch regressions in this area reliably in
      the future.
      
      <rdar://problem/12693963>
      
      llvm-svn: 169924
      496970f6
  3. Dec 07, 2012
    • Daniel Malea's avatar
      Fix a few more clang (3.2) warnings on Linux: · a85e6b6c
      Daniel Malea authored
      - remove unused members
      - add NO_PEDANTIC to selected Makefiles
      - fix return values (removed NULL as needed)
      - disable warning about four-char-constants
      - remove unneeded const from operator*() declaration
      - add missing lambda function return types
      - fix printf() with no format string
      - change sizeof to use a type name instead of variable name
      - fix Linux ProcessMonitor.cpp to be 32/64 bit friendly
      - disable warnings emitted by swig-generated C++ code
      
      Patch by Matt Kopec!
      
      llvm-svn: 169645
      a85e6b6c
  4. Dec 01, 2012
  5. Nov 29, 2012
  6. Oct 30, 2012
    • Greg Clayton's avatar
      Path from Ashok Thirumurthi: · 0665a0f0
      Greg Clayton authored
      The attached patch adds eValueTypeVector to lldb_private::Value.  The nested struct Vector is patterned after RegisterValue::m_data.buffer.  This change to Value allows ClangExpressionDeclMap::LookupDecl to return vector register data for consumption by InterpreterStackFrame::ResolveValue.  Note that ResolveValue was tweaked slightly to allocate enough memory for vector registers.
       
      An immediate result of this patch is that "expr $xmm0" generates the same results on Linux as on the Mac, which is good enough for TestRegisters.py.  In addition, the log of m_memory.PrintData(data_region.m_base, data_region.m_extent) shows that the register content has been resolved successfully.  On the other hand, the output is glaringly empty:
          runCmd: expr $xmm0
          output: (unsigned char __attribute__((ext_vector_type(16)))) $0 = {}
          Expecting sub string: vector_type
          Matched
      
      llvm-svn: 167033
      0665a0f0
  7. Oct 12, 2012
  8. Oct 11, 2012
  9. Oct 08, 2012
  10. Aug 11, 2012
  11. Aug 09, 2012
  12. Jul 17, 2012
  13. Apr 23, 2012
  14. Mar 14, 2012
    • Greg Clayton's avatar
      <rdar://problem/10434005> · d64afba5
      Greg Clayton authored
      Prepare LLDB to be built with C++11 by hiding all accesses to std::tr1 behind
      macros that allows us to easily compile for either C++.
      
      llvm-svn: 152698
      d64afba5
  15. Feb 29, 2012
  16. Feb 15, 2012
  17. Feb 08, 2012
    • Sean Callanan's avatar
      The IRInterpreter's constant evaluator wasn't · 94a9a39e
      Sean Callanan authored
      sufficiently general - it could only handle
      literals and operations that didn't change the
      data.  Now the constant evaluator passes APInt
      values around, and can handle GetElementPtr
      constants.
      
      llvm-svn: 150034
      94a9a39e
  18. 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
  19. Jan 29, 2012
    • Greg Clayton's avatar
      Switching back to using std::tr1::shared_ptr. We originally switched away · e1cd1be6
      Greg Clayton authored
      due to RTTI worries since llvm and clang don't use RTTI, but I was able to 
      switch back with no issues as far as I can tell. Once the RTTI issue wasn't
      an issue, we were looking for a way to properly track weak pointers to objects
      to solve some of the threading issues we have been running into which naturally
      led us back to std::tr1::weak_ptr. We also wanted the ability to make a shared 
      pointer from just a pointer, which is also easily solved using the 
      std::tr1::enable_shared_from_this class. 
      
      The main reason for this move back is so we can start properly having weak
      references to objects. Currently a lldb_private::Thread class has a refrence
      to its parent lldb_private::Process. This doesn't work well when we now hand
      out a SBThread object that contains a shared pointer to a lldb_private::Thread
      as this SBThread can be held onto by external clients and if they end up
      using one of these objects we can easily crash.
      
      So the next task is to start adopting std::tr1::weak_ptr where ever it makes
      sense which we can do with lldb_private::Debugger, lldb_private::Target,
      lldb_private::Process, lldb_private::Thread, lldb_private::StackFrame, and
      many more objects now that they are no longer using intrusive ref counted
      pointer objects (you can't do std::tr1::weak_ptr functionality with intrusive
      pointers).
      
      llvm-svn: 149207
      e1cd1be6
  20. Jan 24, 2012
  21. Jan 11, 2012
  22. Jan 04, 2012
  23. 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
  24. Oct 31, 2011
  25. Oct 26, 2011
    • Sean Callanan's avatar
      Extended the IR interpreter to handle the variables · d2cb626a
      Sean Callanan authored
      "_cmd", "this", and "self".  These variables are handled
      differently from all other external variables used by
      the expression.  Other variables are used indirectly
      through the $__lldb_arg operand; only _cmd, this, and
      self are passed directly through the ABI.
      
      There are two modifications:
      
       - I added a function to ClangExpressionDeclMap that
         retrives the value of one of these variables by name;
         and
      
       - I made IRInterpreter fetch these values when needed,
         and ensured that the proper level of indirection is
         used.
      
      llvm-svn: 143065
      d2cb626a
  26. Oct 21, 2011
  27. Oct 12, 2011
  28. Sep 22, 2011
    • Sean Callanan's avatar
      Fixed a problem with the IR interpreter that caused · 0886e565
      Sean Callanan authored
      it to generate result variables that were not bound
      to their underlying data.  This allowed the SBValue
      class to use the interpreter (if possible).
      
      Also made sure that any result variables that point
      to stack allocations in the stack frame of the
      interpreted expressions do not get live data.
      
      llvm-svn: 140285
      0886e565
  29. Sep 15, 2011
    • Sean Callanan's avatar
      This patch modifies the expression parser to allow it · 3bfdaa2a
      Sean Callanan authored
      to execute expressions even in the absence of a process.
      This allows expressions to run in situations where the
      target cannot run -- e.g., to perform calculations based
      on type information, or to inspect a binary's static
      data.
      
      This modification touches the following files:
      
      lldb-private-enumerations.h
        Introduce a new enum specifying the policy for
        processing an expression.  Some expressions should
        always be JITted, for example if they are functions
        that will be used over and over again.  Some
        expressions should always be interpreted, for
        example if the target is unsafe to run.  For most,
        it is acceptable to JIT them, but interpretation
        is preferable when possible.
      
      Target.[h,cpp]
        Have EvaluateExpression now accept the new enum.
      
      ClangExpressionDeclMap.[cpp,h]
        Add support for the IR interpreter and also make
        the ClangExpressionDeclMap more robust in the 
        absence of a process.
      
      ClangFunction.[cpp,h]
        Add support for the new enum.
      
      IRInterpreter.[cpp,h]
        New implementation.
      
      ClangUserExpression.[cpp,h]
        Add support for the new enum, and for running 
        expressions in the absence of a process.
      
      ClangExpression.h
        Remove references to the old DWARF-based method
        of evaluating expressions, because it has been
        superseded for now.
      
      ClangUtilityFunction.[cpp,h]
        Add support for the new enum.
      
      ClangExpressionParser.[cpp,h]
        Add support for the new enum, remove references
        to DWARF, and add support for checking whether
        the expression could be evaluated statically.
      
      IRForTarget.[h,cpp]
        Add support for the new enum, and add utility
        functions to support the interpreter.
      
      IRToDWARF.cpp
        Removed
      
      CommandObjectExpression.cpp
        Remove references to the obsolete -i option.
      
      Process.cpp 
        Modify calls to ClangUserExpression::Evaluate
        to pass the correct enum (for dlopen/dlclose)
      
      SBValue.cpp
        Add support for the new enum.
      
      SBFrame.cpp
        Add support for he new enum.
      
      BreakpointOptions.cpp
        Add support for the new enum.
      
      llvm-svn: 139772
      3bfdaa2a
Loading