Skip to content
  1. Jan 18, 2011
  2. Jan 17, 2011
    • 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
    • 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
      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
    • Greg Clayton's avatar
      Removed printf statements in code. · 1629c43d
      Greg Clayton authored
      llvm-svn: 123455
      1629c43d
    • 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
    • Caroline Tice's avatar
      Split up the Python script interpreter code to allow multiple script interpreter objects to · 2f88aadf
      Caroline Tice authored
      exist within the same process (one script interpreter object per debugger object).  The
      python script interpreter objects are all using the same global Python script interpreter;
      they use separate dictionaries to keep their data separate, and mutex's to prevent any object
      attempting to use the global Python interpreter when another object is already using it.
      
      llvm-svn: 123415
      2f88aadf
  6. Jan 13, 2011
    • Sean Callanan's avatar
      Fixed handling of explicitly-declared persistent · e1175b7c
      Sean Callanan authored
      variables.
      
      llvm-svn: 123398
      e1175b7c
    • Sean Callanan's avatar
      Implemented a major overhaul of the way variables are handled · 92adcac9
      Sean Callanan authored
      by LLDB.  Instead of being materialized into the input structure
      passed to the expression, variables are left in place and pointers
      to them are materialzied into the structure.  Variables not resident
      in memory (notably, registers) get temporary memory regions allocated
      for them.
      
      Persistent variables are the most complex part of this, because they
      are made in various ways and there are different expectations about
      their lifetime.  Persistent variables now have flags indicating their
      status and what the expectations for longevity are.  They can be
      marked as residing in target memory permanently -- this is the
      default for result variables from expressions entered on the command
      line and for explicitly declared persistent variables (but more on
      that below).  Other result variables have their memory freed.
      
      Some major improvements resulting from this include being able to
      properly take the address of variables, better and cleaner support
      for functions that return references, and cleaner C++ support in
      general.  One problem that remains is the problem of explicitly
      declared persistent variables; I have not yet implemented the code
      that makes references to them into indirect references, so currently
      materialization and dematerialization of these variables is broken.
      
      llvm-svn: 123371
      92adcac9
    • Greg Clayton's avatar
      Plug Free BSD memory leak. · 87ff1acc
      Greg Clayton authored
      llvm-svn: 123357
      87ff1acc
    • Greg Clayton's avatar
      Call SetFile instead of constructing a temp object and assigning to... · 984cb75b
      Greg Clayton authored
      Call SetFile instead of constructing a temp object and assigning to g_program_filespec for Free BSD port.
      
      llvm-svn: 123356
      984cb75b
Loading