Skip to content
  1. Sep 02, 2010
    • Greg Clayton's avatar
      StackFrame objects now own ValueObjects for any frame variables (locals, args, · 288bdf9c
      Greg Clayton authored
      function statics, file globals and static variables) that a frame contains. 
      The StackFrame objects can give out ValueObjects instances for
      each variable which allows us to track when a variable changes and doesn't
      depend on variable names when getting value objects.
      
      StackFrame::GetVariableList now takes a boolean to indicate if we want to
      get the frame compile unit globals and static variables.
      
      The value objects in the stack frames can now correctly track when they have
      been modified. There are a few more tweaks needed to complete this work. The
      biggest issue is when stepping creates partial stacks (just frame zero usually)
      and causes previous stack frames not to match up with the current stack frames
      because the previous frames only has frame zero. We don't really want to 
      require that all previous frames be complete since stepping often must check
      stack frames to complete their jobs. I will fix this issue tomorrow.
      
      llvm-svn: 112800
      288bdf9c
  2. Aug 30, 2010
    • Greg Clayton's avatar
      Clarified the intent of the SymbolContextScope class in the header · 59e8fc1c
      Greg Clayton authored
      documentation. Symbol now inherits from the symbol
      context scope so that the StackID can use a "SymbolContextScope *"
      instead of a blockID (which could have been the same as some other
      blockID from another symbol file). 
      
      Modified the stacks that are created on subsequent stops to reuse
      the previous stack frame objects which will allow for some internal
      optimization using pointer comparisons during stepping. 
      
      llvm-svn: 112495
      59e8fc1c
  3. Aug 24, 2010
    • Greg Clayton's avatar
      Got a lot of the kinks worked out in the inline support after debugging more · 9da7bd07
      Greg Clayton authored
      complex inlined examples.
      
      StackFrame classes don't have a "GetPC" anymore, they have "GetFrameCodeAddress()".
      This is because inlined frames will have a PC value that is the same as the 
      concrete frame that owns the inlined frame, yet the code locations for the
      frame can be different. We also need to be able to get the real PC value for
      a given frame so that variables evaluate correctly. To get the actual PC
      value for a frame you can use:
      
          addr_t pc = frame->GetRegisterContext()->GetPC();
      
      Some issues with the StackFrame stomping on its own symbol context were 
      resolved which were causing the information to change for a frame when the
      stack ID was calculated. Also the StackFrame will now correctly store the
      symbol context resolve flags for any extra bits of information that were 
      looked up (if you ask for a block only and you find one, you will alwasy have
      the compile unit and function).
      
      llvm-svn: 111964
      9da7bd07
    • Greg Clayton's avatar
      Added support for inlined stack frames being represented as real stack frames · 1b72fcb7
      Greg Clayton authored
      which is now on by default. Frames are gotten from the unwinder as concrete
      frames, then if inline frames are to be shown, extra information to track
      and reconstruct these frames is cached with each Thread and exanded as needed.
      
      I added an inline height as part of the lldb_private::StackID class, the class
      that helps us uniquely identify stack frames. This allows for two frames to
      shared the same call frame address, yet differ only in inline height.
      
      Fixed setting breakpoint by address to not require addresses to resolve.
      
      A quick example:
      
      % cat main.cpp
      
      % ./build/Debug/lldb test/stl/a.out 
      Current executable set to 'test/stl/a.out' (x86_64).
      (lldb) breakpoint set --address 0x0000000100000d31
      Breakpoint created: 1: address = 0x0000000100000d31, locations = 1
      (lldb) r
      Launching 'a.out'  (x86_64)
      (lldb) Process 38031 Stopped
      * thread #1: tid = 0x2e03, pc = 0x0000000100000d31, where = a.out`main [inlined] std::string::_M_data() const at /usr/include/c++/4.2.1/bits/basic_string.h:280, stop reason = breakpoint 1.1, queue = com.apple.main-thread
       277   	
       278   	      _CharT*
       279   	      _M_data() const
       280 ->	      { return  _M_dataplus._M_p; }
       281   	
       282   	      _CharT*
       283   	      _M_data(_CharT* __p)
      (lldb) bt
      thread #1: tid = 0x2e03, stop reason = breakpoint 1.1, queue = com.apple.main-thread
        frame #0: pc = 0x0000000100000d31, where = a.out`main [inlined] std::string::_M_data() const at /usr/include/c++/4.2.1/bits/basic_string.h:280
        frame #1: pc = 0x0000000100000d31, where = a.out`main [inlined] std::string::_M_rep() const at /usr/include/c++/4.2.1/bits/basic_string.h:288
        frame #2: pc = 0x0000000100000d31, where = a.out`main [inlined] std::string::size() const at /usr/include/c++/4.2.1/bits/basic_string.h:606
        frame #3: pc = 0x0000000100000d31, where = a.out`main [inlined] operator<< <char, std::char_traits<char>, std::allocator<char> > at /usr/include/c++/4.2.1/bits/basic_string.h:2414
        frame #4: pc = 0x0000000100000d31, where = a.out`main + 33 at /Volumes/work/gclayton/Documents/src/lldb/test/stl/main.cpp:14
        frame #5: pc = 0x0000000100000d08, where = a.out`start + 52
      
      Each inline frame contains only the variables that they contain and each inlined
      stack frame is treated as a single entity.
      
      llvm-svn: 111877
      1b72fcb7
  4. Aug 21, 2010
    • Greg Clayton's avatar
      Modified the host process monitor callback function Host::StartMonitoringChildProcess · 0b76a2c2
      Greg Clayton authored
      to spawn a thread for each process that is being monitored. Previously
      LLDB would spawn a single thread that would wait for any child process which
      isn't ok to do as a shared library (LLDB.framework on Mac OSX, or lldb.so on
      linux). The old single thread used to call wait4() with a pid of -1 which 
      could cause it to reap child processes that it shouldn't have.
      
      Re-wrote the way Function blocks are handles. Previously I attempted to keep
      all blocks in a single memory allocation (in a std::vector). This made the
      code somewhat efficient, but hard to work with. I got rid of the old BlockList
      class, and went to a straight parent with children relationship. This new 
      approach will allow for partial parsing of the blocks within a function.
      
      llvm-svn: 111706
      0b76a2c2
  5. Aug 20, 2010
  6. Aug 18, 2010
  7. Aug 10, 2010
  8. Aug 05, 2010
  9. Aug 04, 2010
    • Sean Callanan's avatar
      Added support for accessing members of C++ objects, · 5666b674
      Sean Callanan authored
      including superclass members.  This involved ensuring
      that access control was ignored, and ensuring that
      the operands of BitCasts were properly scanned for
      variables that needed importing.
      
      Also laid the groundwork for declaring objects of
      custom types; however, this functionality is disabled
      for now because of a potential loop in ASTImporter.
      
      llvm-svn: 110174
      5666b674
  10. Aug 03, 2010
    • Greg Clayton's avatar
      Added support for objective C built-in types: id, Class, and SEL. This · b0b9fe61
      Greg Clayton authored
      involved watching for the objective C built-in types in DWARF and making sure
      when we convert the DWARF types into clang types that we use the appropriate
      ASTContext types.
      
      Added a way to find and dump types in lldb (something equivalent to gdb's 
      "ptype" command):
      
          image lookup --type <TYPENAME>
      
      This only works for looking up types by name and won't work with variables.
      It also currently dumps out verbose internal information. I will modify it
      to dump more appropriate user level info in my next submission.
      
      Hookup up the "FindTypes()" functions in the SymbolFile and SymbolVendor so
      we can lookup types by name in one or more images.
      
      Fixed "image lookup --address <ADDRESS>" to be able to correctly show all
      symbol context information, but it will only show this extra information when
      the new "--verbose" flag is used.
      
      Updated to latest LLVM to get a few needed fixes.
      
      llvm-svn: 110089
      b0b9fe61
  11. Jul 30, 2010
  12. Jul 29, 2010
  13. Jul 28, 2010
    • Greg Clayton's avatar
      Created lldb::LanguageType by moving an enumeration from the · 9e40956a
      Greg Clayton authored
      lldb_private::Language class into the enumerations header so it can be freely
      used by other interfaces.
      
      Added correct objective C class support to the DWARF symbol parser. Prior to
      this fix we were parsing objective C classes as C++ classes and now that the
      expression parser is ready to call functions we need to make sure the objective
      C classes have correct AST types.
      
      llvm-svn: 109574
      9e40956a
  14. Jul 27, 2010
    • Sean Callanan's avatar
      Changed SymbolContext so when you search for functions · 8ade104a
      Sean Callanan authored
      it returns a list of functions as a SymbolContextList.
      
      Rewrote the clients of SymbolContext to use this
      SymbolContextList.
      
      Rewrote some of the providers of the data to SymbolContext
      to make them respect preferences as to whether the list
      should be cleared first; propagated that change out.
      
      ClangExpressionDeclMap and ClangASTSource use this new
      function list to properly generate function definitions -
      even for functions that don't have a prototype in the
      debug information.
      
      llvm-svn: 109476
      8ade104a
  15. Jul 23, 2010
  16. Jul 22, 2010
    • Greg Clayton's avatar
      Added a new enumeration named "ClangASTContext::AccessType" that abstracts the... · 8cf0593c
      Greg Clayton authored
      Added a new enumeration named "ClangASTContext::AccessType" that abstracts the type creation from the various access enumerations in Clang. Currently there are clang::AccessSpecifier and the objective C ivars have their own enumeration. So I added a new enumeration that will allow a consistent interface when creating types through ClangASTContext.
      
      I also added new functions to create an Objective C class, ivar and set an objective C superclass. They aren't hooked up in the DWARF parser yet. That is the next step, though I am unsure if I will do this in the DWARF parser or try and do it generically in the existing Record manipulation functions.
      
      llvm-svn: 109130
      8cf0593c
    • Greg Clayton's avatar
      Change over to using the definitions for mach-o types and defines to the · e1a916a7
      Greg Clayton authored
      defines that are in "llvm/Support/MachO.h". This should allow ObjectFileMachO
      and ObjectContainerUniversalMachO to be able to be cross compiled in Linux.
      
      Also did some cleanup on the ASTType by renaming it to ClangASTType and
      renaming the header file. Moved a lot of "AST * + opaque clang type *"
      functionality from lldb_private::Type over into ClangASTType.
      
      llvm-svn: 109046
      e1a916a7
  17. Jul 21, 2010
  18. Jul 20, 2010
  19. Jul 16, 2010
  20. Jul 14, 2010
  21. Jul 09, 2010
  22. Jul 08, 2010
  23. Jul 07, 2010
  24. Jul 05, 2010
  25. Jul 02, 2010
    • Greg Clayton's avatar
      More leaks detection: · 0b42ac32
      Greg Clayton authored
      - fixed 3 posix spawn attributes leaks 
      - fixed us always leaking CXXBaseSpecifier objects when we create class 
        base classes. Clang apparently copies the base classes we pass in.
      
      Fixed some code formatting in ClangASTContext.cpp.
      
      llvm-svn: 107459
      0b42ac32
  26. Jul 01, 2010
    • Greg Clayton's avatar
      Centralized all disassembly into static functions in source/Core/Disassembler.cpp. · dda4f7b5
      Greg Clayton authored
      Added the ability to read memory from the target's object files when we aren't
      running, so disassembling works before you run!
      
      Cleaned up the API to lldb_private::Target::ReadMemory().
      
      Cleaned up the API to the Disassembler to use actual "lldb_private::Address"
      objects instead of just an "addr_t". This is nice because the Address objects
      when resolved carry along their section and module which can get us the 
      object file. This allows Target::ReadMemory to be used when we are not 
      running.
      
      Added a new lldb_private::Address dump style: DumpStyleDetailedSymbolContext
      This will show a full breakdown of what an address points to. To see some
      sample output, execute a "image lookup --address <addr>".
      
      Fixed SymbolContext::DumpStopContext(...) to not require a live process in
      order to be able to print function and symbol offsets.
      
      llvm-svn: 107350
      dda4f7b5
  27. Jun 28, 2010
    • Greg Clayton's avatar
      Added function name types to allow us to set breakpoints by name more · 0c5cd90d
      Greg Clayton authored
      intelligently. The four name types we currently have are:
      
      eFunctionNameTypeFull       = (1 << 1), // The function name.
                                              // For C this is the same as just the name of the function
                                              // For C++ this is the demangled version of the mangled name.
                                              // For ObjC this is the full function signature with the + or
                                              // - and the square brackets and the class and selector
      eFunctionNameTypeBase       = (1 << 2), // The function name only, no namespaces or arguments and no class 
                                              // methods or selectors will be searched.
      eFunctionNameTypeMethod     = (1 << 3), // Find function by method name (C++) with no namespace or arguments
      eFunctionNameTypeSelector   = (1 << 4)  // Find function by selector name (ObjC) names
      
      
      this allows much more flexibility when setting breakoints:
      
      (lldb) breakpoint set --name main --basename
      (lldb) breakpoint set --name main --fullname
      (lldb) breakpoint set --name main --method
      (lldb) breakpoint set --name main --selector
      
      The default:
      
      (lldb) breakpoint set --name main
      
      will inspect the name "main" and look for any parens, or if the name starts
      with "-[" or "+[" and if any are found then a full name search will happen.
      Else a basename search will be the default.
      
      Fixed some command option structures so not all options are required when they
      shouldn't be.
      
      Cleaned up the breakpoint output summary.
      
      Made the "image lookup --address <addr>" output much more verbose so it shows
      all the important symbol context results. Added a GetDescription method to 
      many of the SymbolContext objects for the more verbose output.
      
      llvm-svn: 107075
      0c5cd90d
  28. Jun 21, 2010
  29. Jun 17, 2010
  30. Jun 16, 2010
  31. Jun 13, 2010
Loading