Skip to content
  1. Apr 17, 2013
    • 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
  2. Apr 16, 2013
  3. 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
    • Sean Callanan's avatar
      Added support for registers to the Materializer. · b5717e00
      Sean Callanan authored
      Also improved logging and error handling in a few
      spots in the Materializer.
      
      llvm-svn: 179557
      b5717e00
    • Sean Callanan's avatar
      Audited the existing Materializer code to ensure · b024d878
      Sean Callanan authored
      that it works in the absence of a process.  Codepaths
      in the Materializer now use the best execution context
      scope available to them.
      
      llvm-svn: 179539
      b024d878
  4. Apr 13, 2013
  5. Apr 12, 2013
    • Sean Callanan's avatar
      Implemented materialization and dematerialization · f8043fa5
      Sean Callanan authored
      for variables in the new Materializer.  This is
      much easier now that the ValueObject API is solid.
      
      I still have to implement reading bytes into a
      ValueObject, but committing what I have so far.
      
      This code is not yet used, so there will be fixes
      when I switch the expression parser over to use the
      new Materializer.
      
      llvm-svn: 179416
      f8043fa5
    • Sean Callanan's avatar
      Replicated the materialization logic for persistent · 35005f76
      Sean Callanan authored
      variables in the Materializer.  We don't use this
      code yet, but will soon once the other materializers
      are online.
      
      llvm-svn: 179390
      35005f76
  6. Apr 11, 2013
  7. Apr 09, 2013
  8. Apr 05, 2013
    • Sean Callanan's avatar
      Factored out memory access into the target process · 5a1af4e6
      Sean Callanan authored
      from IRExecutionUnit into a superclass called
      IRMemoryMap.  IRMemoryMap handles all reading and
      writing, ensuring that areas are kept track of and
      memory is properly cached (and deleted).
      
      Also fixed several cases where we would simply leak
      binary data in the target process over time.  Now
      the expression objects explicitly own their
      IRExecutionUnit and delete it when they go away.  This
      is why I had to modify ClangUserExpression,
      ClangUtilityFunction, and ClangFunction.
      
      As a side effect of this, I am removing the JIT
      mutex for an IRMemoryMap.  If it turns out that we
      need this mutex, I'll add it in then, but right now
      it's just adding complexity.
      
      This is part of a more general project to make
      expressions fully reusable.  The next step is to
      make materialization and dematerialization use
      the IRMemoryMap API rather than writing and
      reading directly from the process's memory. 
      This will allow the IR interpreter to use the
      same data, but in the host's memory, without having
      to use a different set of pointers.
      
      llvm-svn: 178832
      5a1af4e6
  9. Apr 03, 2013
    • Rafael Espindola's avatar
      Fix build. · f24933f6
      Rafael Espindola authored
      This should fix the build breakage caused by the api change in 178663.
      
      llvm-svn: 178700
      f24933f6
    • Greg Clayton's avatar
      <rdar://problem/13506727> · 43fe217b
      Greg Clayton authored
      Symbol table function names should support lookups like symbols with debug info. 
      
      To fix this I:
      - Gutted the way FindFunctions is used, there used to be way too much smarts only in the DWARF plug-in
      - Made it more efficient by chopping the name up once and using simpler queries so that SymbolFile and Symtab plug-ins don't need to do as much
      - Filter the results at a higher level
      - Make the lldb_private::Symtab able to chop up C++ mangled names and make as much sense out of them as possible and also be able to search by basename, fullname, method name, and selector name.
      
      llvm-svn: 178608
      43fe217b
  10. Apr 02, 2013
  11. Mar 30, 2013
  12. Mar 29, 2013
    • Greg Clayton's avatar
      <rdar://problem/11730263> · 3faf47c4
      Greg Clayton authored
      PC relative loads are missing disassembly comments when disassembled in a live process.
      
      This issue was because some sections, like __TEXT and __DATA in libobjc.A.dylib, were being moved when they were put into the dyld shared cache. This could also affect any other system that slides sections individually.
      
      The solution is to keep track of wether the bytes we will disassemble are from an executable file (file address), or from a live process (load address). We now do the right thing based off of this input in all cases.
      
      llvm-svn: 178315
      3faf47c4
  13. Mar 28, 2013
    • Jim Ingham's avatar
      Use the error from ValidatePlan. · 23460c36
      Jim Ingham authored
      llvm-svn: 178204
      23460c36
    • 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
  14. Mar 27, 2013
  15. Mar 25, 2013
  16. Mar 23, 2013
  17. Mar 21, 2013
    • Sean Callanan's avatar
      Modified the way we report fields of records. · 6b200d0b
      Sean Callanan authored
      Clang requires them to have complete types, but
      we were previously only completing them if they
      were of tag or Objective-C object types.
      
      I have implemented a method on the ASTImporter
      whose job is to complete a type.  It handles not
      only the cases mentioned above, but also array
      and atomic types.
      
      <rdar://problem/13446777>
      
      llvm-svn: 177672
      6b200d0b
  18. Mar 20, 2013
  19. Mar 19, 2013
    • Sean Callanan's avatar
      Fixed handling of function pointers in the IR · 9be9d172
      Sean Callanan authored
      interpreter.  They now have correct values, even
      when the process is not running.
      
      llvm-svn: 177372
      9be9d172
    • 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
  20. Mar 14, 2013
  21. Mar 12, 2013
  22. Mar 10, 2013
Loading