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
    • Greg Clayton's avatar
      Abstract "struct sockaddr", "struct sockaddr_in", "struct sockaddr_in6" and · ad440da3
      Greg Clayton authored
      "struct sockaddr_storage" into a new host class called SocketAddress. This
      will allow us to control the host specific implementations (such as how to
      get the length) into a single Host specific class.
      
      llvm-svn: 135488
      ad440da3
    • Greg Clayton's avatar
      Modified the LocateMacOSXFilesUsingDebugSymbols(...) function to locate · a63d08c9
      Greg Clayton authored
      an executable file if it is right next to a dSYM file that is found using
      DebugSymbols. The code also looks into a bundle if the dSYM file is right
      next to a bundle.
      
      Modified the MacOSX kernel dynamic loader plug-in to correctly set the load
      address for kext sections. This is a tad tricky because of how LLDB chooses
      to treat mach-o segments with no name. Also modified the loader to properly
      handle the older version 1 kext summary info.
      
      Fixed a crasher in the Mach-o object file parser when it is trying to set
      the section size correctly for dSYM sections.
      
      Added packet dumpers to the CommunicationKDP class. We now also properly 
      detect address byte sizes based on the cpu type and subtype that is provided.
      Added a read memory and read register support to CommunicationKDP. Added a
      ThreadKDP class that now uses subclasses of the RegisterContextDarwin_XXX for
      arm, i386 and x86_64. 
      
      Fixed some register numbering issues in the RegisterContextDarwin_arm class
      and added ARM GDB numbers to the ARM_GCC_Registers.h file.
      
      Change the RegisterContextMach_XXX classes over to subclassing their
      RegisterContextDarwin_XXX counterparts so we can share the mach register 
      contexts between the user and kernel plug-ins.
      
      llvm-svn: 135466
      a63d08c9
    • Enrico Granata's avatar
      Fixed a bug where deleting a regex summary would not immediately reflect in the variables display · 1490c6fd
      Enrico Granata authored
      The "systemwide summaries" feature has been removed and replaced with a more general and
      powerful mechanism.
      Categories:
       - summaries can now be grouped into buckets, called "categories" (it is expected that categories
         correspond to libraries and/or runtime environments)
       - to add a summary to a category, you can use the -w option to type summary add and give
         a category name (e.g. type summary add -f "foo" foo_t -w foo_category)
       - categories are by default disabled, which means LLDB will not look into them for summaries,
         to enable a category use "type category enable". once a category is enabled, LLDB will
         look into that category for summaries. the rules are quite trivial: every enabled category
         is searched for an exact match. if an exact match is nowhere to be found, any match is
         searched for in every enabled category (whether it involves cascading, going to base classes,
         ...). categories are searched into the order in which they were enabled (the most recently
         enabled category first, then the second most and so on..)
       - by default, most commands that deal with summaries, use a category named "default" if no
         explicit -w parameter is given (the observable behavior of LLDB should not change when
         categories are not explicitly used)
       - the systemwide summaries are now part of a "system" category
      
      llvm-svn: 135463
      1490c6fd
    • Johnny Chen's avatar
      Initialize the all important automatic variable 'lldb::ConnectionStatus status' before · 74549c82
      Johnny Chen authored
      invoking the Read(...) method to read in bytes.  This seems to fix the infinite looping
      I was seeing on SnowLeopard while running the test suite.
      
      llvm-svn: 135461
      74549c82
  2. Jul 18, 2011
  3. 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
  4. 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
    • Enrico Granata's avatar
      Some descriptive text for the Python script feature: · 0c5ef693
      Enrico Granata authored
       - help type summary add now gives some hints on how to use it
      frame variable and target variable now have a --no-summary-depth (-Y) option:
       - simply using -Y without an argument will skip one level of summaries, i.e.
         your aggregate types will expand their children and display no summary, even
         if they have one. children will behave normally
       - using -Y<int>, as in -Y4, -Y7, ..., will skip as many levels of summaries as
         given by the <int> parameter (obviously, -Y and -Y1 are the same thing). children
         beneath the given depth level will behave normally
       -Y0 is the same as omitting the --no-summary-depth parameter entirely
       This option replaces the defined-but-unimplemented --no-summary
      
      llvm-svn: 135336
      0c5ef693
    • Enrico Granata's avatar
      System-wide summaries: · 9dd75c88
      Enrico Granata authored
       - Summaries for char*, const char* and char[] are loaded at startup as
         system-wide summaries. This means you cannot delete them unless you use
         the -a option to type summary delete/clear
       - You can add your own system-wide summaries by using the -w option to type
         summary add
      Several code improvements for the Python summaries feature
      
      llvm-svn: 135326
      9dd75c88
  5. Jul 15, 2011
    • Greg Clayton's avatar
      Added the ability to get synthetic child values from SBValue objects that · f6602482
      Greg Clayton authored
      represent pointers and arrays by adding an extra parameter to the 
      
      SBValue
      SBValue::GetChildAtIndex (uint32_t idx, 
                               DynamicValueType use_dynamic, 
                               bool can_create_synthetic);
      
      The new "can_create_synthetic" will allow you to create child values that
      aren't actually a part of the original type. So if you code like:
      
      int *foo_ptr = ...
      
      And you have a SBValue that contains the value for "foo_ptr":
      
      SBValue foo_value = ...
      
      You can now get the "foo_ptr[12]" item by doing this:
      
      v = foo_value.GetChiltAtIndex (12, lldb.eNoDynamicValues, True);
      
      Normall the "foo_value" would only have one child value (an integer), but
      we can create "synthetic" child values by treating the pointer as an array.
      
      Likewise if you have code like:
      
      int array[2];
      
      array_value = ....
      
      v = array_value.GetChiltAtIndex (0);     // Success, v will be valid
      v = array_value.GetChiltAtIndex (1);     // Success, v will be valid
      v = array_value.GetChiltAtIndex (2);     // Fail, v won't be valid, "2" is not a valid zero based index in "array"
      
      But if you use the ability to create synthetic children:
      
      v = array_value.GetChiltAtIndex (0, lldb.eNoDynamicValues, True);     // Success, v will be valid
      v = array_value.GetChiltAtIndex (1, lldb.eNoDynamicValues, True);     // Success, v will be valid
      v = array_value.GetChiltAtIndex (2, lldb.eNoDynamicValues, True);     // Success, v will be valid
      
      llvm-svn: 135292
      f6602482
    • Greg Clayton's avatar
      Fixed the comment lines in the file comment headers. · 59ec512c
      Greg Clayton authored
      llvm-svn: 135284
      59ec512c
    • Greg Clayton's avatar
      Added the ability to connect using "tcp://<host>:<port>" which is the · 57508026
      Greg Clayton authored
      same as the old "connect://<host>:<port>". Also added the ability to
      connect using "udp://<host>:<port>" which will open a connected 
      datagram socket. I need to find a way to specify a non connected
      datagram socket as well. 
      
      We might need to start setting some settings in the URL itself, 
      maybe something like:
      
      udp://<host>:<port>?connected=yes
      udp://<host>:<port>?connected=no
      
      I am open to suggestions for URL settings.
      
      Also did more work on the KDP darwin kernel plug-in.
      
       
      
      llvm-svn: 135277
      57508026
    • Greg Clayton's avatar
      Hollowed out process plug-in to do KDP darwin kernel debugging. · f9765acd
      Greg Clayton authored
      llvm-svn: 135240
      f9765acd
    • Enrico Granata's avatar
      Python summary strings: · f2bbf717
      Enrico Granata authored
       - you can use a Python script to write a summary string for data-types, in one of
         three ways:
          -P option and typing the script a line at a time
          -s option and passing a one-line Python script
          -F option and passing the name of a Python function
         these options all work for the "type summary add" command
         your Python code (if provided through -P or -s) is wrapped in a function
         that accepts two parameters: valobj (a ValueObject) and dict (an LLDB
         internal dictionary object). if you use -F and give a function name,
         you're expected to define the function on your own and with the right
         prototype. your function, however defined, must return a Python string
       - test case for the Python summary feature
       - a few quirks:
        Python summaries cannot have names, and cannot use regex as type names
        both issues will be fixed ASAP
      major redesign of type summary code:
       - type summary working with strings and type summary working with Python code
         are two classes, with a common base class SummaryFormat
       - SummaryFormat classes now are able to actively format objects rather than
         just aggregating data
       - cleaner code to print descriptions for summaries
      the public API now exports a method to easily navigate a ValueObject hierarchy
      New InputReaderEZ and PriorityPointerPair classes
      Several minor fixes and improvements
      
      llvm-svn: 135238
      f2bbf717
    • Johnny Chen's avatar
      Fixed a crasher where entering 'help disasm' on the command line would crash lldb. · 331eff39
      Johnny Chen authored
      The reasom of the crash is because of a missing entry in the argument table corresponding to eArgTypeUnsignedInteger.
      Add such entry and modify the call site of the crash to go through a fail-fast API to retrieve the argument table.
      
      Add a regression test to TestHelp.py.
      
      llvm-svn: 135206
      331eff39
  6. Jul 13, 2011
    • Enrico Granata's avatar
      fixing missing RefCounter class · 79dce0a6
      Enrico Granata authored
      llvm-svn: 135012
      79dce0a6
    • 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
    • Johnny Chen's avatar
      Fix short description of 'target variable' command. · ef1c6845
      Johnny Chen authored
      llvm-svn: 135005
      ef1c6845
  7. 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
    • Jim Ingham's avatar
      Added "command history" command to dump the command history. · a5a97ebe
      Jim Ingham authored
      Also made:
      (lldb) !<NUM>
      (lldb) !-<NUM>
      (lldb) !!
      
      work with the history.  For added benefit:
      
      (lldb) !<NUM><TAB>
      
      will insert the command at position <NUM> in the history into the command line to be edited.
      
      This is only partial, I still need to sync up editline's history list with the one kept by the interpreter.
      
      llvm-svn: 134955
      a5a97ebe
    • Enrico Granata's avatar
      named summaries: · f9fa6ee5
      Enrico Granata authored
       - a new --name option for "type summary add" lets you give a name to a summary
       - a new --summary option for "frame variable" lets you bind a named summary to one or more variables
      ${var%s} now works for printing the value of 0-terminated CStrings
      type format test case now tests for cascading
       - this is disabled on GCC because GCC may end up stripping typedef chains, basically breaking cascading
      new design for the FormatNavigator class
      new template class CleanUp2 meant to support cleanup routines with 1 additional parameter beyond resource handle
      
      llvm-svn: 134943
      f9fa6ee5
  8. 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
  9. Jul 10, 2011
    • Greg Clayton's avatar
      Allow the built in ValueObject summary providers for C strings · 45ba8543
      Greg Clayton authored
      use lldb_private::Target::ReadMemory(...) to allow constant strings
      to be displayed in global variables prior on in between process
      execution.
      
      Centralized the variable declaration dumping into:
      
      	bool
      	Variable::DumpDeclaration (Stream *s, bool show_fullpaths, bool show_module);
      
      Fixed an issue if you used "target variable --regex <regex>" where the
      variable name would not be displayed, but the regular expression would.
      
      Fixed an issue when viewing global variables through "target variable"
      might not display correctly when doing DWARF in object files.
      
      llvm-svn: 134878
      45ba8543
    • Greg Clayton's avatar
      Fixed an assertion crasher. We now handle things correclty and · dda0d127
      Greg Clayton authored
      emit an error to stderr when we see this issue.
      
      llvm-svn: 134872
      dda0d127
  10. Jul 09, 2011
  11. Jul 08, 2011
Loading