Skip to content
  1. 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
  2. Apr 11, 2013
  3. Apr 09, 2013
  4. 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
  5. 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
  6. Apr 02, 2013
  7. Mar 30, 2013
  8. 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
  9. 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
  10. Mar 27, 2013
  11. Mar 25, 2013
  12. Mar 23, 2013
  13. 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
  14. Mar 20, 2013
  15. 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
  16. Mar 14, 2013
  17. Mar 12, 2013
  18. Mar 10, 2013
  19. Mar 09, 2013
  20. Mar 08, 2013
    • Sean Callanan's avatar
      Added very lightweight, statically-allocated · 8106d808
      Sean Callanan authored
      counters for a variety of metrics associated
      with expression parsing.  This should give some
      idea of how much work the expression parser is
      doing on Clang's behalf, and help with hopefully
      reducing that load over time.
      
      <rdar://problem/13210748> Audit type search/import for expressions
      
      llvm-svn: 176714
      8106d808
  21. Mar 06, 2013
  22. Mar 04, 2013
    • Greg Clayton's avatar
      <rdar://problem/13338643> · 9422dd64
      Greg Clayton authored
      DWARF with .o files now uses 40-60% less memory!
      
      Big fixes include:
      - Change line table internal representation to contain "file addresses". Since each line table is owned by a compile unit that is owned by a module, it makes address translation into lldb_private::Address easy to do when needed.
      - Removed linked address members/methods from lldb_private::Section and lldb_private::Address
      - lldb_private::LineTable can now relink itself using a FileRangeMap to make it easier to re-link line tables in the future
      - Added ObjectFile::ClearSymtab() so that we can get rid of the object file symbol tables after we parse them once since they are not needed and kept memory allocated for no reason
      - Moved the m_sections_ap (std::auto_ptr to section list) and m_symtab_ap (std::auto_ptr to the lldb_private::Symtab) out of each of the ObjectFile subclasses and put it into lldb_private::ObjectFile.
      - Changed how the debug map is parsed and stored to be able to:
          - Lazily parse the debug map for each object file
          - not require the address map for a .o file until debug information is linked for a .o file
      
      llvm-svn: 176454
      9422dd64
  23. Mar 02, 2013
  24. Feb 28, 2013
    • Sean Callanan's avatar
      Fixed some problems with type deportation: · 933ca2e2
      Sean Callanan authored
        - made sure we tell Clang not to try to
          complete the type since it can't be
          completed from its origin any more; and
      
        - fixed a silly bug where we tried to
          forget about the original decl's origins
          rather than the deported decl's origin.
      
      These produced some crashes in ptr_refs,
      especially under libgmalloc.
      
      <rdar://problem/13256150>
      
      llvm-svn: 176233
      933ca2e2
  25. Feb 27, 2013
Loading