Skip to content
  1. Apr 19, 2013
    • Sean Callanan's avatar
      This commit changes the way LLDB executes user · 1582ee68
      Sean Callanan authored
      expressions.  
      
      Previously, ClangUserExpression assumed that if
      there was a constant result for an expression 
      then it could be determined during parsing.  In
      particular, the IRInterpreter ran while parser
      state (in particular, ClangExpressionDeclMap) 
      was present.  This approach is flawed, because
      the IRInterpreter actually is capable of using
      external variables, and hence the result might
      be different each run.  Until now, we papered
      over this flaw by re-parsing the expression each
      time we ran it.
      
      I have rewritten the IRInterpreter to be 
      completely independent of the ClangExpressionDeclMap.
      Instead of special-casing external variable lookup,
      which ties the IRInterpreter closely to LLDB,
      we now interpret the exact same IR that the JIT
      would see.  This IR assumes that materialization
      has occurred; hence the recent implementation of the
      Materializer, which does not require parser state
      (in the form of ClangExpressionDeclMap) to be 
      present.
      
      Materialization, interpretation, and dematerialization
      are now all independent of parsing.  This means that
      in theory we can parse expressions once and run them
      many times.  I have three outstanding tasks before
      shutting this down:
      
          - First, I will ensure that all of this works with
            core files.  Core files have a Process but do not
            allow allocating memory, which currently confuses
            materialization.
      
          - Second, I will make expression breakpoint 
            conditions remember their ClangUserExpression and
            re-use it.
      
          - Third, I will tear out all the redundant code
            (for example, materialization logic in
            ClangExpressionDeclMap) that is no longer used.
      
      While implementing this fix, I also found a bug in
      IRForTarget's handling of floating-point constants.  
      This should be fixed.
      
      llvm-svn: 179801
      1582ee68
    • Jim Ingham's avatar
      Document how to get "info line" information from "image lookup -v". · 526560a5
      Jim Ingham authored
      llvm-svn: 179800
      526560a5
    • Greg Clayton's avatar
  2. Apr 18, 2013
  3. Apr 17, 2013
    • Ashok Thirumurthi's avatar
      Fix for regression in TestCPPStaticMethods.py due to refactoring in clang. · b32f6bff
      Ashok Thirumurthi authored
      - Specify SC_Static given DIE attributes for static methods and operators.
      
      Thanks to Wei Pan for his review and the help with root-causing.
      
      llvm-svn: 179727
      b32f6bff
    • Daniel Malea's avatar
      Silence some warnings about deprecated declarations · bbd05810
      Daniel Malea authored
      - auto_ptr is one example of this
      
      llvm-svn: 179712
      bbd05810
    • Daniel Malea's avatar
      Add missing include · 9ff5633f
      Daniel Malea authored
      llvm-svn: 179711
      9ff5633f
    • Daniel Malea's avatar
      Fix build on Linux · ffeb4b60
      Daniel Malea authored
      - add a workaround header to define uuid_t on platforms that need it
      - unbreak remote debugging of mac os x apps
      
      llvm-svn: 179710
      ffeb4b60
    • Daniel Malea's avatar
      Revert 179694 -- it breaks remote debugging of mac os x targets for some folk · f41cfba5
      Daniel Malea authored
      - will commit a different workaround momentarily
      
      llvm-svn: 179705
      f41cfba5
    • Sean Callanan's avatar
      Added a new API to the IRInterpreter (the old API · 14cb2aaa
      Sean Callanan authored
      will be gone soon!) that lets it interpret a function
      using just an llvm::Module, an llvm::Function, and a
      MemoryMap.
      
      Also added an API to IRExecutionUnit to get at its
      llvm::Function, so that the IRInterpreter can work
      with it.
      
      llvm-svn: 179704
      14cb2aaa
    • Sean Callanan's avatar
      Made the IRInterpreter's methods static, since · 182bd6c0
      Sean Callanan authored
      it doesn't actually hold any important state.
      
      llvm-svn: 179702
      182bd6c0
    • Sean Callanan's avatar
      Made the IRInterpreter be able to operate without · 175187b3
      Sean Callanan authored
      a ClangExpressionDeclMap.  Any functions that
      require value resolution etc. fail if the
      ClangExpressionDeclMap isn't present - which is
      exactly what is desired.
      
      llvm-svn: 179695
      175187b3
    • Daniel Malea's avatar
      Fix Linux build of LLDB · 82363863
      Daniel Malea authored
      - conditionally build mac-specific plugins only on mac (PluginObjectFileMachO, PluginDynamicLoaderDrawinKernel and PluginDynamicLoaderMacOSXDYLD)
      - clean up warnings by ignoring deprecated declarations (auto_ptr for example)
      
      llvm-svn: 179694
      82363863
    • Sean Callanan's avatar
      Removed the "expr" alias for "expression," which · 90e579f2
      Sean Callanan authored
      is entirely unnecessary and confuses the command
      interpreter when the user types "exp".
      
      llvm-svn: 179691
      90e579f2
    • Sean Callanan's avatar
      Updated the IRInterpreter to work with an · 08052afa
      Sean Callanan authored
      IRMemoryMap rather than through its own memory
      abstraction.  This considerably simplifies the
      code, and makes it possible to run the
      IRInterpreter multiple times on an already-parsed
      expression in the absence of a ClangExpressionDeclMap.
      
      Changes include:
      
        - ClangExpressionDeclMap's interface methods
          for the IRInterpreter now take IRMemoryMap
          arguments.  They are not long for this world,
          however, since the IRInterpreter will soon be
          working with materialized variables.
      
        - As mentioned above, removed the Memory class
          from the IR interpreter altogether.  It had a
          few functions that remain useful, such as
          keeping track of Values that have been placed
          in memory, so I moved those into methods on
          InterpreterStackFrame.
      
        - Changed IRInterpreter to work with lldb::addr_t
          rather than Memory::Region as its primary
          currency.
      
        - Fixed a bug in the IRMemoryMap where it did not
          report correct address byte size and byte order
          if no process was present, because it was using
          Target::GetDefaultArchitecture() rather than
          Target::GetArchitecture().
      
        - Made IRMemoryMap methods clear the Errors they
          receive before running.  Having to do this by
          hand is just annoying.
      
      The testsuite seems happy with these changes, but
      please let me know if you see problems (especially
      in use cases without a process).
      
      llvm-svn: 179675
      08052afa
    • Sean Callanan's avatar
      Modified the IRInterpreter to take an IRMemoryMap. · 179b5485
      Sean Callanan authored
      It doesn't use it yet; the next step is to make it
      use the IRMemoryMap instead of its own conjured-up
      Memory class.
      
      llvm-svn: 179650
      179b5485
    • Sean Callanan's avatar
      Flipped the big switch: LLDB now uses the new · 14b1bae5
      Sean Callanan authored
      Materializer for all expressions that need to
      run in the target.  This includes the following
      changes:
      
      - Removed a bunch of (de-)materialization code
        from ClangExpressionDeclMap and assumed the
        presence of a Materializer where we previously
        had a fallback.
      
      - Ensured that an IRMemoryMap is passed into
        ClangExpressionDeclMap::Materialize().
      
      - Fixed object ownership on LLVMContext; it is
        now owned by the IRExecutionUnit, since the
        Module and the ExecutionEngine both depend on
        its existence.
      
      - Fixed a few bugs in IRMemoryMap and the
        Materializer that showed up during testing.
      
      llvm-svn: 179649
      14b1bae5
    • Jason Molenda's avatar
      42b69fa8
    • Jim Ingham's avatar
      Make sure all the threads get a chance to compute their StopInfo's before we start running · 7bc3465f
      Jim Ingham authored
      ShouldStop on the threads, which might destroy information needed to correctly compute another 
      thread's StopInfo.
      
      <rdar://problem/13664026>
      
      llvm-svn: 179641
      7bc3465f
  4. Apr 16, 2013
  5. Apr 15, 2013
    • Sean Callanan's avatar
      Fixed a few bugs in IRMemoryMap: · c8c5b8dc
      Sean Callanan authored
      - If an allocation is mirrored between the host
        and the process, update the host's version
        before returning a DataExtractor pointing to
        it.
      
      - If anyone attempts to access memory in a
        process/target that does not have a corresponding
        allocation, try accessing the memory directly
        before erroring out.
      
      llvm-svn: 179561
      c8c5b8dc
    • Enrico Granata's avatar
      More updates to test cases · b0270899
      Enrico Granata authored
      llvm-svn: 179560
      b0270899
Loading