Skip to content
  1. Jan 19, 2011
  2. Jan 17, 2011
    • Johnny Chen's avatar
      Terminate the current process being debugged. · 07b28922
      Johnny Chen authored
      The test framework was relying on detecting either "run" or
      "process launch" command to automatically kill the inferior.
      
      llvm-svn: 123683
      07b28922
    • Greg Clayton's avatar
      A few of the issue I have been trying to track down and fix have been due to · 6beaaa68
      Greg Clayton authored
      the way LLDB lazily gets complete definitions for types within the debug info.
      When we run across a class/struct/union definition in the DWARF, we will only
      parse the full definition if we need to. This works fine for top level types
      that are assigned directly to variables and arguments, but when we have a 
      variable with a class, lets say "A" for this example, that has a member:
      "B *m_b". Initially we don't need to hunt down a definition for this class
      unless we are ever asked to do something with it ("expr m_b->getDecl()" for
      example). With my previous approach to lazy type completion, we would be able
      to take a "A *a" and get a complete type for it, but we wouldn't be able to
      then do an "a->m_b->getDecl()" unless we always expanded all types within a
      class prior to handing out the type. Expanding everything is very costly and
      it would be great if there were a better way.
      
      A few months ago I worked with the llvm/clang folks to have the 
      ExternalASTSource class be able to complete classes if there weren't completed
      yet:
      
      class ExternalASTSource {
      ....
      
          virtual void
          CompleteType (clang::TagDecl *Tag);
          
          virtual void 
          CompleteType (clang::ObjCInterfaceDecl *Class);
      };
      
      This was great, because we can now have the class that is producing the AST
      (SymbolFileDWARF and SymbolFileDWARFDebugMap) sign up as external AST sources
      and the object that creates the forward declaration types can now also
      complete them anywhere within the clang type system.
      
      This patch makes a few major changes:
      - lldb_private::Module classes now own the AST context. Previously the TypeList
        objects did.
      - The DWARF parsers now sign up as an external AST sources so they can complete
        types.
      - All of the pure clang type system wrapper code we have in LLDB (ClangASTContext,
        ClangASTType, and more) can now be iterating through children of any type,
        and if a class/union/struct type (clang::RecordType or ObjC interface) 
        is found that is incomplete, we can ask the AST to get the definition. 
      - The SymbolFileDWARFDebugMap class now will create and use a single AST that
        all child SymbolFileDWARF classes will share (much like what happens when
        we have a complete linked DWARF for an executable).
        
      We will need to modify some of the ClangUserExpression code to take more 
      advantage of this completion ability in the near future. Meanwhile we should
      be better off now that we can be accessing any children of variables through
      pointers and always be able to resolve the clang type if needed.
      
      llvm-svn: 123613
      6beaaa68
  3. Jan 14, 2011
    • Johnny Chen's avatar
      Converted to use Makefile.rules. · ded0a2c0
      Johnny Chen authored
      llvm-svn: 123471
      ded0a2c0
    • Johnny Chen's avatar
      Add makefile debugging rule for printing out the value of a variable. · fa38041d
      Johnny Chen authored
      From http://blog.melski.net/tag/debugging-makefiles/.
      
      Example:
      
      [13:14:59] johnny:/Volumes/data/lldb/svn/trunk/test/class_static $ make print-CC
      CC=gcc
        origin = file
        flavor = recursive
         value = gcc
      [13:15:09] johnny:/Volumes/data/lldb/svn/trunk/test/class_static $ make print-LD
      LD=  g++
        origin = file
        flavor = recursive
         value = $(call cxx_linker,$(CC))
      [13:15:21] johnny:/Volumes/data/lldb/svn/trunk/test/class_static $ make print-CXX
      CXX=  g++
        origin = file
        flavor = recursive
         value = $(call cxx_compiler,$(CC))
      [13:15:29] johnny:/Volumes/data/lldb/svn/trunk/test/class_static $
      
      llvm-svn: 123469
      fa38041d
    • Johnny Chen's avatar
      Added comments. · 6055b44b
      Johnny Chen authored
      llvm-svn: 123463
      6055b44b
    • Johnny Chen's avatar
      d43e208b
    • Johnny Chen's avatar
      Add an expression command: · 15a42aef
      Johnny Chen authored
          expression (int)[nil_mutable_array count]
      
      within NSArray_expr() function and expect a return of 0.
      
      llvm-svn: 123454
      15a42aef
    • Johnny Chen's avatar
      The cxx_compiler function should not blindly return clang++ as the C++... · bdb4efcf
      Johnny Chen authored
      The cxx_compiler function should not blindly return clang++ as the C++ compiler if $(CC) contains "clang".
      Instead, it should perform a textual replacement of $(CC) from "clang" to "clang++".  The same is true
      for "llvm-gcc" to "llvm-g++" and for "gcc" to "g++".  This way, we keep the path component of the $(CC)
      passed in from the user and do not end up with a mixed toolchains with different paths.
      
      Ditto for a newly added function called cxx_linker.
      
      llvm-svn: 123451
      bdb4efcf
    • Greg Clayton's avatar
      Fixed an error in the type map for "char **" that was a bad memory smasher. · ca512b39
      Greg Clayton authored
      Anytime we had a valid python list that was trying to go from Python down into
      our C++ API, it was allocating too little memory and it ended up smashing
      whatever was next to the allocated memory.
      
      Added typemap conversions for "void *, size_t" so we can get 
      SBProcess::ReadMemory() working. Also added a typemap for "const void *, size_t"
      so we can get SBProcess::WriteMemory() to work.
      
      Fixed an issue in the DWARF parser where we weren't correctly calculating the
      DeclContext for all types and classes. We now should be a lot more accurate.
      Fixes include: enums should now be setting their parent decl context correctly.
      We saw a lot of examples where enums in classes were not being properly
      namespace scoped. Also, classes within classes now get properly scoped.
      
      Fixed the objective C runtime pointer checkers to let "nil" pointers through
      since these are accepted by compiled code. We also now don't call "abort()"
      when a pointer doesn't validate correctly since this was wreaking havoc on
      the process due to the way abort() works. We now just dereference memory
      which should give us an exception from which we can easily and reliably 
      recover.
      
      llvm-svn: 123428
      ca512b39
  4. Jan 10, 2011
  5. Jan 08, 2011
  6. Jan 07, 2011
  7. Jan 06, 2011
  8. Jan 05, 2011
  9. Jan 03, 2011
  10. Dec 24, 2010
  11. Dec 23, 2010
  12. Dec 22, 2010
  13. Dec 21, 2010
  14. Dec 20, 2010
  15. Dec 17, 2010
  16. Dec 16, 2010
  17. Dec 15, 2010
Loading