Skip to content
  1. Apr 09, 2013
  2. 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
  3. 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
  4. 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
  5. Mar 27, 2013
  6. Mar 20, 2013
    • Sean Callanan's avatar
      Updated the IRExecutionUnit to keep local copies · 2c047356
      Sean Callanan authored
      of the data it writes down into the process even
      if the process doesn't exist.  This will allow
      the IR interpreter to access static data allocated
      on the expression's behalf.
      
      Also cleaned up object ownership in the
      IRExecutionUnit so that allocations are created
      into the allocations vector.  This avoids needless
      data copies.
      
      <rdar://problem/13424594>
      
      llvm-svn: 177456
      2c047356
  7. 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
Loading