Skip to content
  1. Apr 23, 2011
    • Greg Clayton's avatar
      Fixed the SymbolContext::DumpStopContext() to correctly indent and dump · 7e14f91d
      Greg Clayton authored
      inline contexts when the deepest most block is not inlined.
      
      Added source path remappings to the lldb_private::Target class that allow it
      to remap paths found in debug info so we can find source files that are elsewhere
      on the current system.
      
      Fixed disassembly by function name to disassemble inline functions that are
      inside other functions much better and to show enough context before the
      disassembly output so you can tell where things came from.
      
      Added the ability to get more than one address range from a SymbolContext 
      class for the case where a block or function has discontiguous address ranges.
      
      llvm-svn: 130044
      7e14f91d
  2. Apr 19, 2011
    • Greg Clayton's avatar
      Added a new option to the "source list" command that allows us to see where · 176761e5
      Greg Clayton authored
      line tables specify breakpoints can be set in the source. When dumping the
      source, the number of breakpoints that can be set on a source line are shown
      as a prefix:
      
      (lldb) source list -f test.c -l1 -c222 -b
             1   	#include <stdio.h>
             2   	#include <sys/fcntl.h>
             3   	#include <unistd.h>
             4   	int
             5   	sleep_loop (const int num_secs)
      [2]    6   	{
             7   	    int i;
      [1]    8   	    for (i=0; i<num_secs; ++i)
             9   	    {
      [1]    10  	        printf("%d of %i - sleep(1);\n", i, num_secs);
      [1]    11  	        sleep(1);       
             12  	    }
             13  	    return 0;
      [1]    14  	}
             15  	
             16  	int 
             17  	main (int argc, char const* argv[])
      [1]    18  	{
      [1]    19  	    printf("Process: %i\n\n", getpid());
      [1]    20  	    puts("Press any key to continue..."); getchar();
      [1]    21  	    sleep_loop (20);
             22  	    return 12;
      [1]    23  	}
      
      Above we can see there are two breakpoints for line 6 and one breakpoint for
      lines 8, 10, 11, 14, 18, 19, 20, 21 and 23. All other lines have no line table
      entries for them. This helps visualize the data provided in the debug 
      information without having to manually dump all line tables. It also includes
      all inline breakpoint that may result for a given file which can also be very
      handy to see.
      
      llvm-svn: 129747
      176761e5
  3. Apr 08, 2011
    • Greg Clayton's avatar
      Modified the ArchSpec to take an optional "Platform *" when setting the triple. · eb0103f2
      Greg Clayton authored
      This allows you to have a platform selected, then specify a triple using
      "i386" and have the remaining triple items (vendor, os, and environment) set
      automatically.
      
      Many interpreter commands take the "--arch" option to specify an architecture
      triple, so now the command options needed to be able to get to the current
      platform, so the Options class now take a reference to the interpreter on
      construction.
      
      Modified the build LLVM building in the Xcode project to use the new
      Xcode project level user definitions:
      
      LLVM_BUILD_DIR - a path to the llvm build directory
      LLVM_SOURCE_DIR - a path to the llvm sources for the llvm that will be used to build lldb
      LLVM_CONFIGURATION - the configuration that lldb is built for (Release, 
      Release+Asserts, Debug, Debug+Asserts).
      
      I also changed the LLVM build to not check if "lldb/llvm" is a symlink and
      then assume it is a real llvm build directory versus the unzipped llvm.zip
      package, so now you can actually have a "lldb/llvm" directory in your lldb
      sources.
      
      llvm-svn: 129112
      eb0103f2
  4. Mar 30, 2011
    • Greg Clayton's avatar
      Many improvements to the Platform base class and subclasses. The base Platform · 32e0a750
      Greg Clayton authored
      class now implements the Host functionality for a lot of things that make 
      sense by default so that subclasses can check:
      
      int
      PlatformSubclass::Foo ()
      {
          if (IsHost())
              return Platform::Foo (); // Let the platform base class do the host specific stuff
          
          // Platform subclass specific code...
          int result = ...
          return result;
      }
      
      Added new functions to the platform:
      
          virtual const char *Platform::GetUserName (uint32_t uid);
          virtual const char *Platform::GetGroupName (uint32_t gid);
      
      The user and group names are cached locally so that remote platforms can avoid
      sending packets multiple times to resolve this information.
      
      Added the parent process ID to the ProcessInfo class. 
      
      Added a new ProcessInfoMatch class which helps us to match processes up
      and changed the Host layer over to using this new class. The new class allows
      us to search for processs:
      1 - by name (equal to, starts with, ends with, contains, and regex)
      2 - by pid
      3 - And further check for parent pid == value, uid == value, gid == value, 
          euid == value, egid == value, arch == value, parent == value.
          
      This is all hookup up to the "platform process list" command which required
      adding dumping routines to dump process information. If the Host class 
      implements the process lookup routines, you can now lists processes on 
      your local machine:
      
      machine1.foo.com % lldb
      (lldb) platform process list 
      PID    PARENT USER       GROUP      EFF USER   EFF GROUP  TRIPLE                   NAME
      ====== ====== ========== ========== ========== ========== ======================== ============================
      99538  1      username   usergroup  username   usergroup  x86_64-apple-darwin      FileMerge
      94943  1      username   usergroup  username   usergroup  x86_64-apple-darwin      mdworker
      94852  244    username   usergroup  username   usergroup  x86_64-apple-darwin      Safari
      94727  244    username   usergroup  username   usergroup  x86_64-apple-darwin      Xcode
      92742  92710  username   usergroup  username   usergroup  i386-apple-darwin        debugserver
      
      
      This of course also works remotely with the lldb-platform:
      
      machine1.foo.com % lldb-platform --listen 1234
      
      machine2.foo.com % lldb
      (lldb) platform create remote-macosx
        Platform: remote-macosx
       Connected: no
      (lldb) platform connect connect://localhost:1444
        Platform: remote-macosx
          Triple: x86_64-apple-darwin
      OS Version: 10.6.7 (10J869)
          Kernel: Darwin Kernel Version 10.7.0: Sat Jan 29 15:17:16 PST 2011; root:xnu-1504.9.37~1/RELEASE_I386
        Hostname: machine1.foo.com
       Connected: yes
      (lldb) platform process list 
      PID    PARENT USER       GROUP      EFF USER   EFF GROUP  TRIPLE                   NAME
      ====== ====== ========== ========== ========== ========== ======================== ============================
      99556  244    username   usergroup  username   usergroup  x86_64-apple-darwin      trustevaluation
      99548  65539  username   usergroup  username   usergroup  x86_64-apple-darwin      lldb
      99538  1      username   usergroup  username   usergroup  x86_64-apple-darwin      FileMerge
      94943  1      username   usergroup  username   usergroup  x86_64-apple-darwin      mdworker
      94852  244    username   usergroup  username   usergroup  x86_64-apple-darwin      Safari
      
      The lldb-platform implements everything with the Host:: layer, so this should
      "just work" for linux. I will probably be adding more stuff to the Host layer
      for launching processes and attaching to processes so that this support should
      eventually just work as well.
      
      Modified the target to be able to be created with an architecture that differs
      from the main executable. This is needed for iOS debugging since we can have
      an "armv6" binary which can run on an "armv7" machine, so we want to be able
      to do:
      
      % lldb
      (lldb) platform create remote-ios
      (lldb) file --arch armv7 a.out
      
      Where "a.out" is an armv6 executable. The platform then can correctly decide
      to open all "armv7" images for all dependent shared libraries.
      
      Modified the disassembly to show the current PC value. Example output:
      
      (lldb) disassemble --frame
      a.out`main:
         0x1eb7:  pushl  %ebp
         0x1eb8:  movl   %esp, %ebp
         0x1eba:  pushl  %ebx
         0x1ebb:  subl   $20, %esp
         0x1ebe:  calll  0x1ec3                   ; main + 12 at test.c:18
         0x1ec3:  popl   %ebx
      -> 0x1ec4:  calll  0x1f12                   ; getpid
         0x1ec9:  movl   %eax, 4(%esp)
         0x1ecd:  leal   199(%ebx), %eax
         0x1ed3:  movl   %eax, (%esp)
         0x1ed6:  calll  0x1f18                   ; printf
         0x1edb:  leal   213(%ebx), %eax
         0x1ee1:  movl   %eax, (%esp)
         0x1ee4:  calll  0x1f1e                   ; puts
         0x1ee9:  calll  0x1f0c                   ; getchar
         0x1eee:  movl   $20, (%esp)
         0x1ef5:  calll  0x1e6a                   ; sleep_loop at test.c:6
         0x1efa:  movl   $12, %eax
         0x1eff:  addl   $20, %esp
         0x1f02:  popl   %ebx
         0x1f03:  leave
         0x1f04:  ret
         
      This can be handy when dealing with the new --line options that was recently
      added:
      
      (lldb) disassemble --line
      a.out`main + 13 at test.c:19
         18  	{
      -> 19  		printf("Process: %i\n\n", getpid());
         20  	    puts("Press any key to continue..."); getchar();
      -> 0x1ec4:  calll  0x1f12                   ; getpid
         0x1ec9:  movl   %eax, 4(%esp)
         0x1ecd:  leal   199(%ebx), %eax
         0x1ed3:  movl   %eax, (%esp)
         0x1ed6:  calll  0x1f18                   ; printf
      
      Modified the ModuleList to have a lookup based solely on a UUID. Since the
      UUID is typically the MD5 checksum of a binary image, there is no need
      to give the path and architecture when searching for a pre-existing
      image in an image list.
      
      Now that we support remote debugging a bit better, our lldb_private::Module
      needs to be able to track what the original path for file was as the platform
      knows it, as well as where the file is locally. The module has the two 
      following functions to retrieve both paths:
      
      const FileSpec &Module::GetFileSpec () const;
      const FileSpec &Module::GetPlatformFileSpec () const;
      
      llvm-svn: 128563
      32e0a750
  5. Mar 26, 2011
    • Greg Clayton's avatar
      Added the ability to get the min and max instruction byte size for · 357132eb
      Greg Clayton authored
      an architecture into ArchSpec:
      
      uint32_t
      ArchSpec::GetMinimumOpcodeByteSize() const;
      
      uint32_t
      ArchSpec::GetMaximumOpcodeByteSize() const;
      
      Added an AddressClass to the Instruction class in Disassembler.h.
      This allows decoded instructions to know know if they are code,
      code with alternate ISA (thumb), or even data which can be mixed
      into code. The instruction does have an address, but it is a good
      idea to cache this value so we don't have to look it up more than 
      once.
      
      Fixed an issue in Opcode::SetOpcodeBytes() where the length wasn't
      getting set.
      
      Changed:
      
      	bool
      	SymbolContextList::AppendIfUnique (const SymbolContext& sc);
      
      To:
      	bool
      	SymbolContextList::AppendIfUnique (const SymbolContext& sc, 
      									   bool merge_symbol_into_function);
      
      This function was typically being used when looking up functions
      and symbols. Now if you lookup a function, then find the symbol,
      they can be merged into the same symbol context and not cause
      multiple symbol contexts to appear in a symbol context list that
      describes the same function.
      
      Fixed the SymbolContext not equal operator which was causing mixed
      mode disassembly to not work ("disassembler --mixed --name main").
      
      Modified the disassembler classes to know about the fact we know,
      for a given architecture, what the min and max opcode byte sizes
      are. The InstructionList class was modified to return the max
      opcode byte size for all of the instructions in its list.
      These two fixes means when disassemble a list of instructions and dump 
      them and show the opcode bytes, we can format the output more 
      intelligently when showing opcode bytes. This affects any architectures
      that have varying opcode byte sizes (x86_64 and i386). Knowing the max
      opcode byte size also helps us to be able to disassemble N instructions
      without having to re-read data if we didn't read enough bytes.
      
      Added the ability to set the architecture for the disassemble command.
      This means you can easily cross disassemble data for any supported 
      architecture. I also added the ability to specify "thumb" as an 
      architecture so that we can force disassembly into thumb mode when
      needed. In GDB this was done using a hack of specifying an odd
      address when disassembling. I don't want to repeat this hack in LLDB,
      so the auto detection between ARM and thumb is failing, just specify
      thumb when disassembling:
      
      (lldb) disassemble --arch thumb --name main
      
      You can also have data in say an x86_64 file executable and disassemble
      data as any other supported architecture:
      % lldb a.out
      Current executable set to 'a.out' (x86_64).
      (lldb) b main
      (lldb) run
      (lldb) disassemble --arch thumb --count 2 --start-address 0x0000000100001080 --bytes
      0x100001080:  0xb580 push   {r7, lr}
      0x100001082:  0xaf00 add    r7, sp, #0
      
      Fixed Target::ReadMemory(...) to be able to deal with Address argument object
      that isn't section offset. When an address object was supplied that was
      out on the heap or stack, target read memory would fail. Disassembly uses
      Target::ReadMemory(...), and the example above where we disassembler thumb
      opcodes in an x86 binary was failing do to this bug.
      
      llvm-svn: 128347
      357132eb
  6. Mar 11, 2011
    • Jim Ingham's avatar
      Add a first pass at a "stop hook" mechanism. This allows you to add commands... · 9575d844
      Jim Ingham authored
      Add a first pass at a "stop hook" mechanism.  This allows you to add commands that get run every time the debugger stops, whether due to a breakpoint, the end of a step, interrupt, etc.  You can also specify in which context you want the stop hook to run, for instance only on a particular thread, or only in a particular shared library, function, file, line range within a file.
      
      Still need to add "in methods of a class" to the specifiers, and the ability to write the stop hooks in the Scripting language as well as in the Command Language.
      
      llvm-svn: 127457
      9575d844
  7. Feb 23, 2011
    • Greg Clayton's avatar
      Abtracted all mach-o and ELF out of ArchSpec. This patch is a modified form · 64195a2c
      Greg Clayton authored
      of Stephen Wilson's idea (thanks for the input Stephen!). What I ended up
      doing was:
      - Got rid of ArchSpec::CPU (which was a generic CPU enumeration that mimics
        the contents of llvm::Triple::ArchType). We now rely upon the llvm::Triple 
        to give us the machine type from llvm::Triple::ArchType.
      - There is a new ArchSpec::Core definition which further qualifies the CPU
        core we are dealing with into a single enumeration. If you need support for
        a new Core and want to debug it in LLDB, it must be added to this list. In
        the future we can allow for dynamic core registration, but for now it is
        hard coded.
      - The ArchSpec can now be initialized with a llvm::Triple or with a C string
        that represents the triple (it can just be an arch still like "i386").
      - The ArchSpec can still initialize itself with a architecture type -- mach-o
        with cpu type and subtype, or ELF with e_machine + e_flags -- and this will
        then get translated into the internal llvm::Triple::ArchSpec + ArchSpec::Core.
        The mach-o cpu type and subtype can be accessed using the getter functions:
        
        uint32_t
        ArchSpec::GetMachOCPUType () const;
      
        uint32_t
        ArchSpec::GetMachOCPUSubType () const;
        
        But these functions are just converting out internal llvm::Triple::ArchSpec 
        + ArchSpec::Core back into mach-o. Same goes for ELF.
      
      All code has been updated to deal with the changes.
      
      This should abstract us until later when the llvm::TargetSpec stuff gets
      finalized and we can then adopt it.
      
      llvm-svn: 126278
      64195a2c
  8. Feb 19, 2011
    • Jim Ingham's avatar
      - Changed all the places where CommandObjectReturn was exporting a StreamString to just exporting · 85e8b814
      Jim Ingham authored
      a Stream, and then added GetOutputData & GetErrorData to get the accumulated data.
      - Added a StreamTee that will tee output to two provided lldb::StreamSP's.
      - Made the CommandObjectReturn use this so you can Tee the results immediately to
      the debuggers output file, as well as saving up the results to return when the command
      is done executing.
      - HandleCommands now uses this so that if you have a set of commands that continue the target
      you will see the commands come out as they are processed.
      - The Driver now uses this to output the command results as you go, which makes the interface
      more reactive seeming.
      
      llvm-svn: 126015
      85e8b814
  9. Feb 08, 2011
  10. Jan 27, 2011
    • Greg Clayton's avatar
      Changed the SymbolFile::FindFunction() function calls to only return · 931180e6
      Greg Clayton authored
      lldb_private::Function objects. Previously the SymbolFileSymtab subclass
      would return lldb_private::Symbol objects when it was asked to find functions.
      
      The Module::FindFunctions (...) now take a boolean "bool include_symbols" so
      that the module can track down functions and symbols, yet functions are found
      by the SymbolFile plug-ins (through the SymbolVendor class), and symbols are
      gotten through the ObjectFile plug-ins.
      
      Fixed and issue where the DWARF parser might run into incomplete class member
      function defintions which would make clang mad when we tried to make certain
      member functions with invalid number of parameters (such as an operator=
      operator that had no parameters). Now we just avoid and don't complete these
      incomplete functions.
      
      llvm-svn: 124359
      931180e6
  11. Nov 13, 2010
    • Greg Clayton's avatar
      Modified the lldb_private::Type clang type resolving code to handle three · 526e5afb
      Greg Clayton authored
      cases when getting the clang type:
      - need only a forward declaration
      - need a clang type that can be used for layout (members and args/return types)
      - need a full clang type
      
      This allows us to partially parse the clang types and be as lazy as possible.
      The first case is when we just need to declare a type and we will complete it
      later. The forward declaration happens only for class/union/structs and enums.
      The layout type allows us to resolve the full clang type _except_ if we have
      any modifiers on a pointer or reference (both R and L value). In this case
      when we are adding members or function args or return types, we only need to
      know how the type will be laid out and we can defer completing the pointee
      type until we later need it. The last type means we need a full definition for
      the clang type.
      
      Did some renaming of some enumerations to get rid of the old "DC" prefix (which
      stands for DebugCore which is no longer around).
      
      Modified the clang namespace support to be almost ready to be fed to the
      expression parser. I made a new ClangNamespaceDecl class that can carry around
      the AST and the namespace decl so we can copy it into the expression AST. I
      modified the symbol vendor and symbol file plug-ins to use this new class.
      
      llvm-svn: 118976
      526e5afb
  12. Oct 30, 2010
  13. Oct 27, 2010
  14. Sep 15, 2010
  15. Sep 11, 2010
  16. Sep 10, 2010
  17. Sep 07, 2010
    • Greg Clayton's avatar
      Added more API to lldb::SBBlock to allow getting the block · 95897c6a
      Greg Clayton authored
      parent, sibling and first child block, and access to the
      inline function information.
      
      Added an accessor the StackFrame:
      
      	Block * lldb_private::StackFrame::GetFrameBlock();
      	
      LLDB represents inline functions as lexical blocks that have
      inlined function information in them. The function above allows
      us to easily get the top most lexical block that defines a stack
      frame. When there are no inline functions in function, the block
      returned ends up being the top most block for the function. When
      the PC is in an inlined funciton for a frame, this will return the
      first parent block that has inlined function information. The
      other accessor: StackFrame::GetBlock() will return the deepest block
      that matches the frame's PC value. Since most debuggers want to display
      all variables in the current frame, the Block returned by
      StackFrame::GetFrameBlock can be used to retrieve all variables for
      the current frame.
      
      Fixed the lldb_private::Block::DumpStopContext(...) to properly
      display inline frames a block should display all of its inlined
      functions. Prior to this fix, one of the call sites was being skipped.
      This is a separate code path from the current default where inlined
      functions get their own frames.
      
      Fixed an issue where a block would always grab variables for any
      child inline function blocks.
      
      llvm-svn: 113195
      95897c6a
  18. Sep 02, 2010
    • Greg Clayton's avatar
      Added a new bool parameter to many of the DumpStopContext() methods that · 6dadd508
      Greg Clayton authored
      might dump file paths that allows the dumping of full paths or just the
      basenames. Switched the stack frame dumping code to use just the basenames for
      the files instead of the full path.
      
      Modified the StackID class to no rely on needing the start PC for the current
      function/symbol since we can use the SymbolContextScope to uniquely identify
      that, unless there is no symbol context scope. In that case we can rely upon
      the current PC value. This saves the StackID from having to calculate the 
      start PC when the StackFrame::GetStackID() accessor is called.
      
      Also improved the StackID less than operator to correctly handle inlined stack
      frames in the same stack.
      
      llvm-svn: 112867
      6dadd508
  19. 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
  20. 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
  21. 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
  22. 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
  23. 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
  24. 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
  25. Jun 08, 2010
Loading