Skip to content
  1. Jun 24, 2013
  2. Jun 19, 2013
  3. Jun 13, 2013
  4. Jun 12, 2013
    • Greg Clayton's avatar
      Huge performance improvements when one breakpoint contains many locations. · d8cf1a11
      Greg Clayton authored
      325,000 breakpoints for running "breakpoint set --func-regex ." on lldb itself (after hitting a breakpoint at main so that LLDB.framework is loaded) used to take up to an hour to set, now we are down under a minute. With warm file caches, we are at 40 seconds, and that is with setting 325,000 breakpoint through the GDB remote API. Linux and the native debuggers might be faster. I haven't timed what how much is debug info parsing and how much is the protocol traffic to/from GDB remote.
      
      That there were many performance issues. Most of them were due to storing breakpoints in the wrong data structures, or using the wrong iterators to traverse the lists, traversing the lists in inefficient ways, and not optimizing certain function name lookups/symbol merges correctly.
      
      Debugging after that is also now very efficient. There were issues with replacing the breakpoint opcodes in memory that was read, and those routines were also fixed.
      
      llvm-svn: 183820
      d8cf1a11
  5. Jun 06, 2013
  6. May 29, 2013
  7. May 10, 2013
  8. Apr 19, 2013
    • Sean Callanan's avatar
      Optimized the way breakpoint conditions are evaluated. · 3dbf346e
      Sean Callanan authored
      Previously, the options for a breakopint or its
      locations stored only the text of the breakpoint
      condition (ironically, they used ClangUserExpression
      as a glorified std::string) and, each time the condition
      had to be evaluated in the StopInfo code, the expression
      parser would be invoked via a static method to parse and
      then execute the expression.
      
      I made several changes here:
      
        - Each breakpoint location now has its own
          ClangUserExpressionSP containing a version of
          the breakpoint expression compiled for that exact
          location.
      
        - Whenever the breakpoint is hit, the breakpoint
          condition expression is simply re-run to determine
          whether to stop.
      
        - If the process changes (e.g., it's re-run) or
          the source code of the expression changes (we use
          a hash so as to avoid doing string comparisons)
          the ClangUserExpressionSP is re-generated.
      
      This should improve performance of breakpoint
      conditions significantly, and takes advantage of
      the recent expression re-use work.
      
      llvm-svn: 179838
      3dbf346e
  9. Apr 18, 2013
    • Greg Clayton's avatar
      Since we use C++11, we should switch over to using std::unique_ptr when C++11... · e01e07b6
      Greg Clayton authored
      Since we use C++11, we should switch over to using std::unique_ptr when C++11 is being used. To do this, we follow what we have done for shared pointers and we define a STD_UNIQUE_PTR macro that can be used and it will "do the right thing". Due to some API differences in std::unique_ptr and due to the fact that we need to be able to compile without C++11, we can't use move semantics so some code needed to change so that it can compile with either C++.
      
      Anyone wanting to use a unique_ptr or auto_ptr should now use the "STD_UNIQUE_PTR(TYPE)" macro.
      
      llvm-svn: 179779
      e01e07b6
  10. Apr 03, 2013
    • Greg Clayton's avatar
      <rdar://problem/13506727> · 43fe217b
      Greg Clayton authored
      Symbol table function names should support lookups like symbols with debug info. 
      
      To fix this I:
      - Gutted the way FindFunctions is used, there used to be way too much smarts only in the DWARF plug-in
      - Made it more efficient by chopping the name up once and using simpler queries so that SymbolFile and Symtab plug-ins don't need to do as much
      - Filter the results at a higher level
      - Make the lldb_private::Symtab able to chop up C++ mangled names and make as much sense out of them as possible and also be able to search by basename, fullname, method name, and selector name.
      
      llvm-svn: 178608
      43fe217b
  11. Mar 28, 2013
    • Greg Clayton's avatar
      <rdar://problem/13521159> · 5160ce5c
      Greg Clayton authored
      LLDB is crashing when logging is enabled from lldb-perf-clang. This has to do with the global destructor chain as the process and its threads are being torn down.
      
      All logging channels now make one and only one instance that is kept in a global pointer which is never freed. This guarantees that logging can correctly continue as the process tears itself down.
      
      llvm-svn: 178191
      5160ce5c
  12. Mar 12, 2013
  13. Feb 21, 2013
    • Daniel Malea's avatar
      Adding CMake build system to LLDB. Some known issues remain: · 23720cc6
      Daniel Malea authored
      - generate-vers.pl has to be called by cmake to generate the version number
      - parallel builds not yet supported; dependency on clang must be explicitly specified
      
      Tested on Linux.
      - Building on Mac will require code-signing logic to be implemented.
      - Building on Windows will require OS-detection logic and some selective directory inclusion
      
      Thanks to Carlo Kok (who originally prepared these CMakefiles for Windows) and Ben Langmuir
      who ported them to Linux!
      
      llvm-svn: 175795
      23720cc6
  14. Feb 14, 2013
  15. Jan 30, 2013
    • Greg Clayton's avatar
      <rdar://problem/9141269> · 1b3815cb
      Greg Clayton authored
      Cleaned up the objective C name parsing code to use a class.
      
      Now breakpoints that are set by name that are objective C methods without the leading '+' or '-' will resolve. We do this by expanding all the objective C names for a given string. For example:
      
      (lldb) b [MyString cStringUsingEncoding:]
      
      Will set a breakpoint with multiple possible names: 
      -[MyString cStringUsingEncoding:]
      +[MyString cStringUsingEncoding:]
      
      Also if you have a category, it will strip the category and set a breakpoint in all variants:
      
      (lldb) [MyString(my_category) cStringUsingEncoding:]
      
      Will resolve to the following names:
      
      -[MyString(my_category) cStringUsingEncoding:]
      +[MyString(my_category) cStringUsingEncoding:]
      -[MyString cStringUsingEncoding:]
      +[MyString cStringUsingEncoding:]
      
      Likewise when we have:
      
      (lldb) b -[MyString(my_category) cStringUsingEncoding:]
      
      It will resolve to two names:
      -[MyString(my_category) cStringUsingEncoding:]
      -[MyString cStringUsingEncoding:]
      
      llvm-svn: 173858
      1b3815cb
  16. Jan 26, 2013
    • Jim Ingham's avatar
      Add "target.process.stop-on-shared-library-events" setting, and make it work. · 2995077d
      Jim Ingham authored
      Add the ability to give breakpoints a "kind" string, and have the StopInfoBreakpoint
      print that in the brief description if set.  Also print the kind - if set - in the breakpoint
      listing.
      Give kinds to a bunch of the internal breakpoints.
      We were deleting the Mac OS X dynamic loader breakpoint as though the id we had stored away was
      a breakpoint site ID, but in fact it was a breakpoint id, so we never actually deleted it.  Fixed that.
      
      llvm-svn: 173555
      2995077d
  17. Jan 25, 2013
    • Greg Clayton's avatar
      <rdar://problem/13069948> · c7bece56
      Greg Clayton authored
      Major fixed to allow reading files that are over 4GB. The main problems were that the DataExtractor was using 32 bit offsets as a data cursor, and since we mmap all of our object files we could run into cases where if we had a very large core file that was over 4GB, we were running into the 4GB boundary.
      
      So I defined a new "lldb::offset_t" which should be used for all file offsets.
      
      After making this change, I enabled warnings for data loss and for enexpected implicit conversions temporarily and found a ton of things that I fixed.
      
      Any functions that take an index internally, should use "size_t" for any indexes and also should return "size_t" for any sizes of collections.
      
      llvm-svn: 173463
      c7bece56
  18. Jan 24, 2013
  19. Jan 08, 2013
    • Greg Clayton's avatar
      <rdar://problem/12953853> · c1b2ccfd
      Greg Clayton authored
      Setting breakpoints using "breakpoint set --selector <SEL>" previously didn't when there was no dSYM file.
      
      Also fixed issues in the test suite that arose after fixing the bug.
      
      Also fixed the log channels to properly ref count the log streams using weak pointers to the streams. This fixes a test suite problem that would happen when you specified a full path to the compiler with the "--compiler" option.
      
      llvm-svn: 171816
      c1b2ccfd
  20. Dec 18, 2012
  21. Dec 05, 2012
  22. Nov 29, 2012
  23. Oct 23, 2012
  24. Oct 05, 2012
    • Jim Ingham's avatar
    • Jason Molenda's avatar
      Ran the sources through the compiler with -Wshadow warnings · ccd41e55
      Jason Molenda authored
      enabled after we'd found a few bugs that were caused by shadowed
      local variables; the most important issue this turned up was
      a common mistake of trying to obtain a mutex lock for the scope
      of a code block by doing
      
              Mutex::Locker(m_map_mutex);
      
      This doesn't assign the lock object to a local variable; it is
      a temporary that has its dtor called immediately.  Instead,
      
              Mutex::Locker locker(m_map_mutex);
      
      does what is intended.  For some reason -Wshadow happened to
      highlight these as shadowed variables.
      
      I also fixed a few obivous and easy shadowed variable issues
      across the code base but there are a couple dozen more that
      should be fixed when someone has a free minute.
      <rdar://problem/12437585>
      
      llvm-svn: 165269
      ccd41e55
  25. Sep 22, 2012
  26. Sep 18, 2012
  27. Sep 04, 2012
  28. Aug 29, 2012
    • Greg Clayton's avatar
      <rdar://problem/11757916> · 1f746071
      Greg Clayton authored
      Make breakpoint setting by file and line much more efficient by only looking for inlined breakpoint locations if we are setting a breakpoint in anything but a source implementation file. Implementing this complex for a many reasons. Turns out that parsing compile units lazily had some issues with respect to how we need to do things with DWARF in .o files. So the fixes in the checkin for this makes these changes:
      - Add a new setting called "target.inline-breakpoint-strategy" which can be set to "never", "always", or "headers". "never" will never try and set any inlined breakpoints (fastest). "always" always looks for inlined breakpoint locations (slowest, but most accurate). "headers", which is the default setting, will only look for inlined breakpoint locations if the breakpoint is set in what are consudered to be header files, which is realy defined as "not in an implementation source file". 
      - modify the breakpoint setting by file and line to check the current "target.inline-breakpoint-strategy" setting and act accordingly
      - Modify compile units to be able to get their language and other info lazily. This allows us to create compile units from the debug map and not have to fill all of the details in, and then lazily discover this information as we go on debuggging. This is needed to avoid parsing all .o files when setting breakpoints in implementation only files (no inlines). Otherwise we would need to parse the .o file, the object file (mach-o in our case) and the symbol file (DWARF in the object file) just to see what the compile unit was.
      - modify the "SymbolFileDWARFDebugMap" to subclass lldb_private::Module so that the virtual "GetObjectFile()" and "GetSymbolVendor()" functions can be intercepted when the .o file contenst are later lazilly needed. Prior to this fix, when we first instantiated the "SymbolFileDWARFDebugMap" class, we would also make modules, object files and symbol files for every .o file in the debug map because we needed to fix up the sections in the .o files with information that is in the executable debug map. Now we lazily do this in the DebugMapModule::GetObjectFile()
      
      Cleaned up header includes a bit as well.
      
      llvm-svn: 162860
      1f746071
  29. Aug 24, 2012
  30. Aug 22, 2012
  31. Aug 15, 2012
  32. Aug 14, 2012
  33. Aug 13, 2012
    • Johnny Chen's avatar
      rdar://problem/12007576 · 209bd65e
      Johnny Chen authored
      Record the snapshot of our watched value when the watchpoint is set or hit.
      And report the old/new values when watchpoint is triggered.  Add some test scenarios.
      
      llvm-svn: 161785
      209bd65e
  34. Aug 10, 2012
  35. Jun 27, 2012
  36. May 30, 2012
Loading