Skip to content
  1. Jul 19, 2011
    • Enrico Granata's avatar
      The implementation of categories is now synchronization safe · 20edcdbe
      Enrico Granata authored
      Code cleanup:
       - The Format Manager implementation is now split between two files: FormatClasses.{h|cpp} where the
         actual formatter classes (ValueFormat, SummaryFormat, ...) are implemented and
         FormatManager.{h|cpp} where the infrastructure classes (FormatNavigator, FormatManager, ...)
         are contained. The wrapper code always remains in Debugger.{h|cpp}
       - Several leftover fields, methods and comments from previous design choices have been removed
      type category subcommands (enable, disable, delete) now can take a list of category names as input
       - for type category enable, saying "enable A B C" is the same as saying
          enable C
          enable B
          enable A
         (the ordering is relevant in enabling categories, and it is expected that a user typing
          enable A B C wants to look into category A, then into B, then into C and not the other
          way round)
       - for the other two commands, the order is not really relevant (however, the same inverted ordering
         is used for consistency)
      
      llvm-svn: 135494
      20edcdbe
  2. 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
  3. Jul 12, 2011
    • Greg Clayton's avatar
      Added the ability to _not_ skip the prologue when settings breakpoints · d16e1e59
      Greg Clayton authored
      by name by adding an extra parameter to the lldb_private::Target breakpoint 
      setting functions.
      
      Added a function in the DWARF symbol file plug-in that can dump errors
      and prints out which DWARF file the error is happening in so we can track
      down what used to be assertions easily.
      
      Fixed the MacOSX kernel plug-in to properly read the kext images and set
      the kext breakpoint to watch for kexts as they are loaded.
      
      llvm-svn: 134990
      d16e1e59
  4. Jul 11, 2011
    • Greg Clayton's avatar
      Added the ability to see block variables when looking up addresses · c749eb89
      Greg Clayton authored
      with the "target modules lookup --address <addr>" command. The variable
      ID's, names, types, location for the address, and declaration is
      displayed.
      
      This can really help with crash logs since we get, on MacOSX at least,
      the registers for the thread that crashed so it is often possible to
      figure out some of the variable contents. 
      
      llvm-svn: 134886
      c749eb89
  5. Jul 09, 2011
  6. Jul 08, 2011
  7. Jul 07, 2011
    • Greg Clayton's avatar
      Added "target variable" command that allows introspection of global · 644247c1
      Greg Clayton authored
      variables prior to running your binary. Zero filled sections now get
      section data correctly filled with zeroes when Target::ReadMemory
      reads from the object file section data.
      
      Added new option groups and option values for file lists. I still need
      to hook up all of the options to "target variable" to allow more complete
      introspection by file and shlib.
      
      Added the ability for ValueObjectVariable objects to be created with
      only the target as the execution context. This allows them to be read
      from the object files through Target::ReadMemory(...). 
      
      Added a "virtual Module * GetModule()" function to the ValueObject
      class. By default it will look to the parent variable object and
      return its module. The module is needed when we have global variables
      that have file addresses (virtual addresses that are specific to
      module object files) and in turn allows global variables to be displayed
      prior to running.
      
      Removed all of the unused proxy object support that bit rotted in 
      lldb_private::Value.
      
      Replaced a lot of places that used "FileSpec::Compare (lhs, rhs) == 0" code
      with the more efficient "FileSpec::Equal (lhs, rhs)".
      
      Improved logging in GDB remote plug-in.
      
      llvm-svn: 134579
      644247c1
  8. Jul 06, 2011
    • Greg Clayton's avatar
      Fixed some issues with ARM backtraces by not processing any push/pop · 34132754
      Greg Clayton authored
      instructions if they are conditional. Also fixed issues where the PC wasn't
      getting bit zero stripped for ARM targets when a stack frame was thumb. We
      now properly call through the GetOpcodeLoadAddress() functions to make sure
      the addresses are properly stripped for any targets that may decorate up
      their addresses.
      
      We now don't pass the SIGSTOP signals along. We can revisit this soon, but
      currently this was interfering with debugging some older ARM targets that
      don't have vCont support in the GDB server.
      
      llvm-svn: 134461
      34132754
    • 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
  9. Jun 29, 2011
  10. Jun 25, 2011
  11. Jun 22, 2011
  12. Jun 20, 2011
  13. Jun 18, 2011
    • Greg Clayton's avatar
      Fixed variable parsing to not parse block variables over and over due to an · c662ec8b
      Greg Clayton authored
      issue in the way block variables are marked as parsed. In the DWARF parser we
      always parse all blocks for a function at once, so we can mark all blocks as
      having all variables parsed and avoid recursive function calls to try and
      reparse things that have already been handled.
      
      Fixed an issue with how variables get scoped into blocks. The DWARF parser can
      now handle abtract class definitions that contain concrete static variables.
      When the concrete instance of the class functions get instantiated, they will
      track down the concrete block for the abtract block and add the variable to
      each block.
      
      llvm-svn: 133302
      c662ec8b
  14. Jun 17, 2011
    • Greg Clayton's avatar
      Added the notion of an system root for SDKs. This is a directory where all · f3dd93c8
      Greg Clayton authored
      libraries and headers exist. This can be specified using the platform select
      function:
      
      platform select --sysroot /Volumes/remote-root remote-macosx
      
      Each platform subclass is free to interpret the sysroot as needed.
      
      Expose the new SDK root directory through the SBDebugger class. 
      
      Fixed an issue with the GDB remote protocol where unimplemented packets were
      not being handled correctly.
      
      llvm-svn: 133231
      f3dd93c8
  15. Jun 15, 2011
    • Caroline Tice's avatar
      · 15356e7f
      Caroline Tice authored
      Replace direct uses of the Debugger's output stream with
      uses of the asynchronous stream.
      
      llvm-svn: 133076
      15356e7f
  16. Jun 04, 2011
  17. Jun 03, 2011
  18. Jun 02, 2011
  19. May 30, 2011
    • Greg Clayton's avatar
      Disable dynamic types being on by default until kinks get worked out when · 5d2fbfed
      Greg Clayton authored
      they don't update correctly. Currently if a variable is unavailable due to
      a register not being available in a higher frame or due to the PC value
      not being a valid location list value, "<unknown type>" will get displayed
      as the variable type. I am not sure what other things will fail, so I am 
      disabling it for now just by letting the default enumeration value default
      to it being disabled.
      
      llvm-svn: 132303
      5d2fbfed
  20. 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
  21. May 22, 2011
    • Jim Ingham's avatar
      Change the m_update_state to an int, and only trigger the "on removal" · a8604693
      Jim Ingham authored
      action the second time the event is removed (the first is the internal -> 
      external transition, the second when it is pulled off the public event
      queue, and further times when it is put back because we are faking a
      stop reason to hide the expression evaluation stops.
      
      llvm-svn: 131869
      a8604693
  22. May 19, 2011
    • Greg Clayton's avatar
      Moved a lot of simple functions from StoppointLocation.cpp to be inlined in · 92bb12ca
      Greg Clayton authored
      StoppointLocation.h.
      
      Added a new lldb_private::Address function:
      
      addr_t
      Address::GetOpcodeLoadAddress (Target *target) const;
      
      This will strip any special bits from an address to make sure it is suitable
      for use in addressing an opcode. Often ARM addresses have an extra bit zero 
      that can be set to indicate ARM vs Thumb addresses (gotten from return address
      registers, or symbol addresses that may be marked up specially). We need to 
      strip these bits off prior to setting breakpoints, so we can centralized the
      place to do this inside the Address class.
      
      llvm-svn: 131658
      92bb12ca
    • Peter Collingbourne's avatar
      ea384b4f
    • Greg Clayton's avatar
      Fixed a crasher that was happened when a log shared pointer wasn't valid. · af247d7b
      Greg Clayton authored
      Fixed ThreadPlanCallFunction::ReportRegisterState(...) to only dump when
      verbose logging is enabled and fixed the function to use the new
      RegisterValue method of reading registers.
      
      Fixed the GDB remote client to not send a continue packet after receiving
      stdout or stderr from the inferior process.
      
      llvm-svn: 131628
      af247d7b
  23. May 18, 2011
    • Greg Clayton's avatar
      One more fix to: · 1c870d6e
      Greg Clayton authored
      bool SectionLoadList::ResolveLoadAddress (addr_t load_addr, Address &so_addr) const;
      
      Where if the address is in the last map entry, we need to look it up correctly.
      My previous fix was incorrect where it looked in the first if there were
      no addresses in the map that were > load_addr. Now we correctly look in the
      last entry if our std::map::lower_bound search returns the end of the 
      collection.
      
      llvm-svn: 131550
      1c870d6e
    • Greg Clayton's avatar
      Added a way to resolve an load address from a target: · cd482e35
      Greg Clayton authored
      bool
      Address::SetLoadAddress (lldb::addr_t load_addr, Target *target);
      
      Added an == and != operator to RegisterValue.
      
      Modified the ThreadPlanTracer to use RegisterValue objects to store the
      register values when single stepping. Also modified the output to be a bit
      less wide.
      
      Fixed the ABIMacOSX_arm to not overwrite stuff on the stack. Also made the
      trivial function call be able to set the ARM/Thumbness of the target 
      correctly, and also sets the return value ARM/Thumbness.
      
      Fixed the encoding on the arm s0-s31 and d16 - d31 registers when the default
      register set from a standard GDB server register sets.
      
      llvm-svn: 131517
      cd482e35
    • Jim Ingham's avatar
      RunThreadPlan should set the plan to "not private" since it needs that, · 17e5c4e2
      Jim Ingham authored
      and then reset it to the original value when done.
      
      llvm-svn: 131498
      17e5c4e2
  24. May 17, 2011
  25. May 16, 2011
  26. May 15, 2011
    • Greg Clayton's avatar
      Added the ability to get the return value from a ThreadPlanCallFunction · 70b57657
      Greg Clayton authored
      thread plan. In order to get the return value, you can call:
      
              void
              ThreadPlanCallFunction::RequestReturnValue (lldb::ValueSP &return_value_sp);
              
      This registers a shared pointer to a return value that will get filled in if
      everything goes well. After the thread plan is run the return value will be
      extracted for you.
      
      Added an ifdef to be able to switch between the LLVM MCJIT and the standand JIT.
      We currently have the standard JIT selected because we have some work to do to
      get the MCJIT fuctioning properly.
      
      Added the ability to call functions with 6 argument in the x86_64 ABI.
      
      Added the ability for GDBRemoteCommunicationClient to detect if the allocate
      and deallocate memory packets are supported and to not call allocate memory 
      ("_M") or deallocate ("_m") if we find they aren't supported.
      
      Modified the ProcessGDBRemote::DoAllocateMemory(...) and ProcessGDBRemote::DoDeallocateMemory(...) 
      to be able to deal with the allocate and deallocate memory packets not being 
      supported. If they are not supported, ProcessGDBRemote will switch to calling
      "mmap" and "munmap" to allocate and deallocate memory instead using our 
      trivial function call support.
      
      Modified the "void ProcessGDBRemote::DidLaunchOrAttach()" to correctly ignore 
      the qHostInfo triple information if any was specified in the target. Currently 
      if the target only specifies an architecture when creating the target:
      
      (lldb) target create --arch i386 a.out
      
      Then the vendor, os and environemnt will be adopted by the target.
      
      If the target was created with any triple that specifies more than the arch:
      
      (lldb) target create --arch i386-unknown-unknown a.out
      
      Then the target will maintain its triple and not adopt any new values. This
      can be used to help force bare board debugging where the dynamic loader for
      static files will get used and users can then use "target modules load ..."
      to set addressses for any files that are desired.
      
      Added back some convenience functions to the lldb_private::RegisterContext class
      for writing registers with unsigned values. Also made all RegisterContext
      constructors explicit to make sure we know when an integer is being converted
      to a RegisterValue. 
      
      llvm-svn: 131370
      70b57657
Loading