Skip to content
  1. 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
  2. Mar 07, 2012
    • Greg Clayton's avatar
      <rdar://problem/10997402> · e7612134
      Greg Clayton authored
      This fix really needed to happen as a previous fix I had submitted for
      calculating symbol sizes made many symbols appear to have zero size since
      the function that was calculating the symbol size was calling another function
      that would cause the calculation to happen again. This resulted in some symbols
      having zero size when they shouldn't. This could then cause infinite stack
      traces and many other side affects.
      
      llvm-svn: 152244
      e7612134
  3. Feb 10, 2012
  4. Oct 13, 2011
  5. Oct 12, 2011
  6. 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
  7. Nov 06, 2010
    • Greg Clayton's avatar
      Modified all logging calls to hand out shared pointers to make sure we · 2d4edfbc
      Greg Clayton authored
      don't crash if we disable logging when some code already has a copy of the
      logger. Prior to this fix, logs were handed out as pointers and if they were
      held onto while a log got disabled, then it could cause a crash. Now all logs
      are handed out as shared pointers so this problem shouldn't happen anymore.
      We are also using our new shared pointers that put the shared pointer count
      and the object into the same allocation for a tad better performance.
      
      llvm-svn: 118319
      2d4edfbc
  8. 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
  9. Jun 08, 2010
Loading