Skip to content
  1. Jan 18, 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
    • Caroline Tice's avatar
      Replace Mutex guarding python interpreter access with Predicate, · 6760a517
      Caroline Tice authored
      allowing timeouts & informing the user when the lock is unavailable.
      
      
      Fixed problem where Debugger::Terminate was clearing the debugger list
      even when the global ref count was greater than zero.
      
      llvm-svn: 123674
      6760a517
    • Greg Clayton's avatar
      Avoid infinite loops in stack backtraces and renamed: · fc75303a
      Greg Clayton authored
          bool RegisterContextLLDB::GetPC (addr_t& pc);
      
      to:
          bool RegisterContextLLDB::ReadPC (addr_t& pc);
          
      To avoid confusion with the GetPC() function that is part of the 
      lldb_private::RegisterContext:
      
          uint64_t RegisterContext::GetPC (uint64_t fail_value);
          
      Bad things could happen if the two got intermixed and the wrong one got
      called.
      
      Fixed inifinite loop detection by watching for two frames where the
      RegisterContextLLDB::CursorSP contains the same start_pc and cfa.
      
          
      
      llvm-svn: 123673
      fc75303a
    • Greg Clayton's avatar
      Removed commented out code since it was incorrect code to begin with and we... · b2a844bf
      Greg Clayton authored
      Removed commented out code since it was incorrect code to begin with and we don't want anyone thinking they should put it back in.
      
      llvm-svn: 123672
      b2a844bf
    • Sean Callanan's avatar
      Fixed a bug which would trigger an assert() in LLDB; · 865267f9
      Sean Callanan authored
      we were setting a forward-declared Objective-C class
      type as being completed using an ExternalSemaSource,
      but this is neither legal nor necessary.
      
      llvm-svn: 123671
      865267f9
    • Greg Clayton's avatar
    • Greg Clayton's avatar
      Fixed the C string summary formatter to not get into an infinite loop for · 23af0d89
      Greg Clayton authored
      long strings in "char *" (with any combo if qualifiers).
      
      llvm-svn: 123616
      23af0d89
    • Greg Clayton's avatar
      Fix the objective C object validator that I broke. When we have ObjC runtime · 7d87b92d
      Greg Clayton authored
      V2 and we only have gdb_class_getClass, then make sure the isa isn't NULL 
      before trying to call gdb_class_getClass otherwise we end up deadlocking the
      objective C runtime.
      
      llvm-svn: 123615
      7d87b92d
    • Greg Clayton's avatar
      Added missing source files. · 47a15b7c
      Greg Clayton authored
      llvm-svn: 123614
      47a15b7c
    • 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 16, 2011
    • Stephen Wilson's avatar
      Initial support for a DynamicLoader plugin on Linux. · 2103e25e
      Stephen Wilson authored
      This patch is enough to have shared objects recognized by LLDB.  We can handle
      position independent executables.  We can handle dynamically loaded modules
      brought in via dlopen.
      
      The DYLDRendezvous class provides an interface to a structure present in the
      address space of ELF-based processes.  This structure provides the address of a
      function which is called by the linker each time a shared object is loaded and
      unloaded (thus a breakpoint at that address will let LLDB intercept such
      events), a list of entries describing the currently loaded shared objects, plus
      a few other things.
      
      On Linux, processes are brought up with an auxiliary vector on the stack.  One
      element in this vector contains the (possibly dynamic) entry address of the
      process.  One does not need to walk the stack to find this information as it is
      also available under /proc/<pid>/auxv.  The new AuxVector class provides a
      convenient read-only view of this auxiliary vector information.  We use the
      dynamic entry address and the address as specified in the object file to compute
      the actual load address of the inferior image.  This strategy works for both
      normal executables and PIE's.
      
      llvm-svn: 123592
      2103e25e
    • Stephen Wilson's avatar
      Make a mandatory call to DestroyThread() in ~LinuxThread(). · 811975d5
      Stephen Wilson authored
      llvm-svn: 123583
      811975d5
  4. Jan 15, 2011
  5. 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
    • Caroline Tice's avatar
      Recent modifications to the Python script interpreter caused some problems · 8f5b2eb1
      Caroline Tice authored
      when handling one-liner commands that contain escaped characters.  In
      order to deal with the new namespace/dictionary stuff, the command was
      being embedded within a second string, which messed up the escaping.
      
      This fixes the problem by handling one-liners in a different manner, so they
      no longer need to be embedded within another string, and can still be
      processed in the proper namespace/dictionary context.
      
      llvm-svn: 123467
      8f5b2eb1
    • Stephen Wilson's avatar
      Extend the ObjectFile interface to support dynamic loading on ELF platforms. · c6c7ca58
      Stephen Wilson authored
      Debuggers on ELF platforms hook into the runtime linker by monitoring a special
      "rendezvous" embedded in the address space of the inferior process.  The exact
      location of this structure is filled in by the runtime linker and can be
      resolved by locating the DT_DEBUG entry in the processes .dynamic section.  The
      new GetImageInfoAddress() method (morally equivalent to
      Process::GetImageInfoAddress) provides the mechanism to locate this information.
      
      GetEntryPoint() simply returns the address of the start symbol in the executable
      if present.  It is useful to the dynamic loader plugin for ELF systems as this
      is the earliest point where LLDB can break and probe the inferiors .dynamic
      section and rendezvous structure.  Also, this address can be used in the
      computation of the virtual base address for position independent executables.
      
      llvm-svn: 123466
      c6c7ca58
    • Stephen Wilson's avatar
      Do not prematurely invalidate thread handle. · 0b8dab72
      Stephen Wilson authored
      Setting m_private_state_thread to an invalid value when the child thread exits
      results in a race condition between calls to ThreadCancel and ThreadJoin.
      
      llvm-svn: 123465
      0b8dab72
    • Stephen Wilson's avatar
      5394e0da
Loading