Skip to content
  1. Jul 17, 2011
    • Greg Clayton's avatar
      Added a boolean to the pure virtual lldb_private::Process::CanDebug(...) · 3a29bdbe
      Greg Clayton authored
      method so process plug-ins that are requested by name can answer yes when
      asked if they can debug a target that might not have any file in the target.
      
      Modified the ConnectionFileDescriptor to have both a read and a write file
      descriptor. This allows us to support UDP, and eventually will allow us to
      support pipes. The ConnectionFileDescriptor class also has a file descriptor
      type for each of the read and write file decriptors so we can use the correct
      read/recv/recvfrom call when reading, or write/send/sendto for writing.
      
      Finished up an initial implementation of UDP where you can use the "udp://"
      URL to specify a host and port to connect to:
      
      (lldb) process connect --plugin kdp-remote udp://host:41139
      
      This will cause a ConnectionFileDescriptor to be created that can send UDP
      packets to "host:41139", and it will also bind to a localhost port that can
      be given out to receive the connectionless UDP reply. 
      
      Added the ability to get to the IPv4/IPv6 socket port number from a 
      ConnectionFileDescriptor instance if either file descriptor is a socket.
      
      The ProcessKDP can now successfully connect to a remote kernel and detach
      using the above "processs connect" command!!! So far we have the following
      packets working:
          KDP_CONNECT
          KDP_DISCONNECT
          KDP_HOSTINFO
          KDP_VERSION
          KDP_REATTACH
      
      Now that the packets are working, adding new packets will go very quickly.
      
      llvm-svn: 135363
      3a29bdbe
  2. Jul 16, 2011
    • Greg Clayton's avatar
      Completed more work on the KDP darwin kernel debugging Process plug-in. · 4df8ddfc
      Greg Clayton authored
      Implemented connect, disconnect, reattach, version, and hostinfo.
      
      Modified the ConnectionFileDescriptor class to be able to handle UDP. 
      
      Added a new Stream subclass called StreamBuffer that is backed by a
      llvm::SmallVector for better efficiency.
      
      Modified the DataExtractor class to have a static function that can
      dump hex bytes into a stream. This is currently being used to dump incoming
      binary packet data in the KDP plug-in.
      
      llvm-svn: 135338
      4df8ddfc
  3. Jul 13, 2011
    • Enrico Granata's avatar
      smarter summary strings: · f4efecd9
      Enrico Granata authored
       - formats %s %char[] %c and %a now work to print 0-terminated c-strings if they are applied to a char* or char[] even without the [] operator (e.g. ${var%s})
       - array formats (char[], intN[], ..) now work when applied to an array of a scalar type even without the [] operator (e.g. ${var%int32_t[]})
      LLDB will not crash because of endless loop when trying to obtain a summary for an object that has no value and references itself in its summary string
      In many cases, a wrong summary string will now display an "<error>" message instead of giving out an empty string
      
      llvm-svn: 135007
      f4efecd9
  4. Jul 06, 2011
    • Enrico Granata's avatar
      new syntax for summary strings: · 9fc1944e
      Enrico Granata authored
       - ${*expr} now simply means to dereference expr before actually using it
       - bitfields, array ranges and pointer ranges now work in a (hopefully) more natural and language-compliant way
      a new class TypeHierarchyNavigator replicates the behavior of the FormatManager in going through type hierarchies
      when one-lining summary strings, children's summaries can be used as well as values
      
      llvm-svn: 134458
      9fc1944e
  5. Jun 18, 2011
    • Greg Clayton's avatar
      Added a new format for displaying an array of characters: eFormatCharArray · 4e4294bd
      Greg Clayton authored
      This us useful because sometomes you have to show a single character as: 'a'
      (using eFormatChar) and other times you might have an array of single 
      charcters for display as: 'a' 'b' 'c', and other times you might want to 
      show the contents of buffer of characters that can contain non printable
      chars: "\0\x22\n123". 
      
      This also fixes an issue that currently happens when you have a single character
      C string (const char *a = "a"; or char b[1] = { 'b' };) that was being output
      as "'a'" incorrectly due to the way the eFormatChar format output worked.
      
      llvm-svn: 133316
      4e4294bd
  6. May 30, 2011
  7. May 23, 2011
    • Greg Clayton's avatar
      Added new lldb_private::Process memory read/write functions to stop a bunch · f3ef3d2a
      Greg Clayton authored
      of duplicated code from appearing all over LLDB:
      
      lldb::addr_t
      Process::ReadPointerFromMemory (lldb::addr_t vm_addr, Error &error);
      
      bool
      Process::WritePointerToMemory (lldb::addr_t vm_addr, lldb::addr_t ptr_value, Error &error);
      
      size_t
      Process::ReadScalarIntegerFromMemory (lldb::addr_t addr, uint32_t byte_size, bool is_signed, Scalar &scalar, Error &error);
      
      size_t
      Process::WriteScalarToMemory (lldb::addr_t vm_addr, const Scalar &scalar, uint32_t size, Error &error);
      
      in lldb_private::Process the following functions were renamed:
      
      From:
      uint64_t
      Process::ReadUnsignedInteger (lldb::addr_t load_addr, 
                                    size_t byte_size,
                                    Error &error);
      
      To:
      uint64_t
      Process::ReadUnsignedIntegerFromMemory (lldb::addr_t load_addr, 
                                              size_t byte_size,
                                              uint64_t fail_value, 
                                              Error &error);
      
      Cleaned up a lot of code that was manually doing what the above functions do
      to use the functions listed above.
      
      Added the ability to get a scalar value as a buffer that can be written down
      to a process (byte swapping the Scalar value if needed):
      
      uint32_t 
      Scalar::GetAsMemoryData (void *dst,
                              uint32_t dst_len, 
                              lldb::ByteOrder dst_byte_order,
                              Error &error) const;
      
      The "dst_len" can be smaller that the size of the scalar and the least 
      significant bytes will be written. "dst_len" can also be larger and the
      most significant bytes will be padded with zeroes. 
      
      Centralized the code that adds or removes address bits for callable and opcode
      addresses into lldb_private::Target:
      
      lldb::addr_t
      Target::GetCallableLoadAddress (lldb::addr_t load_addr, AddressClass addr_class) const;
      
      lldb::addr_t
      Target::GetOpcodeLoadAddress (lldb::addr_t load_addr, AddressClass addr_class) const;
      
      All necessary lldb_private::Address functions now use the target versions so
      changes should only need to happen in one place if anything needs updating.
      
      Fixed up a lot of places that were calling :
      
      addr_t
      Address::GetLoadAddress(Target*);
      
      to call the Address::GetCallableLoadAddress() or Address::GetOpcodeLoadAddress()
      as needed. There were many places in the breakpoint code where things could
      go wrong for ARM if these weren't used.
      
      llvm-svn: 131878
      f3ef3d2a
  8. May 09, 2011
    • Greg Clayton's avatar
      While implementing unwind information using UnwindAssemblyInstEmulation I ran · 7349bd90
      Greg Clayton authored
      into some cleanup I have been wanting to do when reading/writing registers.
      Previously all RegisterContext subclasses would need to implement:
      
      virtual bool
      ReadRegisterBytes (uint32_t reg, DataExtractor &data);
      
      virtual bool
      WriteRegisterBytes (uint32_t reg, DataExtractor &data, uint32_t data_offset = 0);
      
      There is now a new class specifically designed to hold register values: 
              lldb_private::RegisterValue
              
      The new register context calls that subclasses must implement are:
      
      virtual bool
      ReadRegister (const RegisterInfo *reg_info, RegisterValue &reg_value) = 0;
      
      virtual bool
      WriteRegister (const RegisterInfo *reg_info, const RegisterValue &reg_value) = 0;
      
      The RegisterValue class must be big enough to handle any register value. The
      class contains an enumeration for the value type, and then a union for the 
      data value. Any integer/float values are stored directly in an appropriate
      host integer/float. Anything bigger is stored in a byte buffer that has a length
      and byte order. The RegisterValue class also knows how to copy register value
      bytes into in a buffer with a specified byte order which can be used to write
      the register value down into memory, and this does the right thing when not
      all bytes from the register values are needed (getting a uint8 from a uint32
      register value..). 
      
      All RegiterContext and other sources have been switched over to using the new
      regiter value class.
      
      llvm-svn: 131096
      7349bd90
  9. Apr 28, 2011
  10. Apr 01, 2011
  11. Feb 04, 2011
  12. Feb 01, 2011
  13. Jan 26, 2011
  14. Jan 15, 2011
  15. Jan 05, 2011
  16. Oct 05, 2010
    • Greg Clayton's avatar
      Added a new ValueObject type that will be used to freeze dry expression · 1d3afba3
      Greg Clayton authored
      results. The clang opaque type for the expression result will be added to the
      Target's ASTContext, and the bytes will be stored in a DataBuffer inside
      the new object. The class is named: ValueObjectConstResult
      
      Now after an expression is evaluated, we can get a ValueObjectSP back that
      contains a ValueObjectConstResult object.
      
      Relocated the value object dumping code into a static function within
      the ValueObject class instead of being in the CommandObjectFrame.cpp file
      which is what contained the code to dump variables ("frame variables").
      
      llvm-svn: 115578
      1d3afba3
  17. Sep 18, 2010
    • Greg Clayton's avatar
      General command line help cleanup: · ed8a705c
      Greg Clayton authored
      - All single character options will now be printed together
      - Changed all options that contains underscores to contain '-' instead
      - Made the help come out a little flatter by showing the long and short
        option on the same line.
      - Modified the short character for "--ignore-count" options to "-i"
      
      llvm-svn: 114265
      ed8a705c
  18. Sep 15, 2010
  19. Sep 14, 2010
  20. Jul 21, 2010
  21. Jul 10, 2010
  22. Jul 09, 2010
  23. Jul 07, 2010
  24. Jul 06, 2010
  25. Jun 12, 2010
  26. Jun 11, 2010
  27. Jun 08, 2010
Loading