[Lldb-commits] [lldb] r125072 - in /lldb/trunk: include/lldb/Symbol/Block.h source/Commands/CommandObjectImage.cpp source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp source/Symbol/Block.cpp source/Symbol/SymbolContext.cpp

Greg Clayton gclayton at apple.com
Mon Feb 7 18:40:32 PST 2011


Author: gclayton
Date: Mon Feb  7 20:40:32 2011
New Revision: 125072

URL: http://llvm.org/viewvc/llvm-project?rev=125072&view=rev
Log:
Fixed a crasher that could happen when trying to look at N_GSYM entries
in the DWARF + debug map symbol file parser.

Also cleaned up the "image lookup --address ADDR" output when we it results
in something that is in an inlined function. Now we correctly dump out the
full inlined call stack.


Modified:
    lldb/trunk/include/lldb/Symbol/Block.h
    lldb/trunk/source/Commands/CommandObjectImage.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
    lldb/trunk/source/Symbol/Block.cpp
    lldb/trunk/source/Symbol/SymbolContext.cpp

Modified: lldb/trunk/include/lldb/Symbol/Block.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Block.h?rev=125072&r1=125071&r2=125072&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/Block.h (original)
+++ lldb/trunk/include/lldb/Symbol/Block.h Mon Feb  7 20:40:32 2011
@@ -323,7 +323,7 @@
     /// Get const accessor for any inlined function information.
     ///
     /// @return
-    ///     A cpmst pointer to any inlined function information, or NULL
+    ///     A comst pointer to any inlined function information, or NULL
     ///     if this is a regular block.
     //------------------------------------------------------------------
     const InlineFunctionInfo*

Modified: lldb/trunk/source/Commands/CommandObjectImage.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectImage.cpp?rev=125072&r1=125071&r2=125072&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectImage.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectImage.cpp Mon Feb  7 20:40:32 2011
@@ -248,7 +248,10 @@
         so_addr.Dump (&strm, exe_scope, Address::DumpStyleSectionNameOffset);
         strm.EOL();
         strm.Indent ("    Summary: ");
+        const uint32_t save_indent = strm.GetIndentLevel ();
+        strm.SetIndentLevel (save_indent + 11);
         so_addr.Dump (&strm, exe_scope, Address::DumpStyleResolvedDescription);
+        strm.SetIndentLevel (save_indent);
         strm.EOL();
         // Print out detailed address information when verbose is enabled
         if (verbose)

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp?rev=125072&r1=125071&r2=125072&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp Mon Feb  7 20:40:32 2011
@@ -363,7 +363,7 @@
 #endif
                                 // Next we find the non-stab entry that corresponds to the N_GSYM in the .o file
                                 Symbol *oso_gsym_symbol = oso_symtab->FindFirstSymbolWithNameAndType(exe_symbol->GetMangled().GetName(), eSymbolTypeData, Symtab::eDebugNo, Symtab::eVisibilityAny);
-                                if (exe_gsym_symbol && oso_gsym_symbol)
+                                if (exe_gsym_symbol && oso_gsym_symbol && exe_gsym_symbol->GetAddressRangePtr() && oso_gsym_symbol->GetAddressRangePtr())
                                 {
                                     // If we found the symbol, then we
                                     Section* exe_gsym_section = const_cast<Section *>(exe_gsym_symbol->GetAddressRangePtr()->GetBaseAddress().GetSection());

Modified: lldb/trunk/source/Symbol/Block.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Block.cpp?rev=125072&r1=125071&r2=125072&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/Block.cpp (original)
+++ lldb/trunk/source/Symbol/Block.cpp Mon Feb  7 20:40:32 2011
@@ -172,7 +172,7 @@
             // First frame in a frame with inlined functions
             s->PutCString (" [inlined]");
         }
-        if (show_inline_blocks)
+        if (show_inline_blocks && child_inline_call_site)
             s->EOL();
         else
             s->PutChar(' ');

Modified: lldb/trunk/source/Symbol/SymbolContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/SymbolContext.cpp?rev=125072&r1=125071&r2=125072&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/SymbolContext.cpp (original)
+++ lldb/trunk/source/Symbol/SymbolContext.cpp Mon Feb  7 20:40:32 2011
@@ -133,29 +133,6 @@
         if (function->GetMangled().GetName())
             function->GetMangled().GetName().Dump(s);
 
-        if (show_inlined_frames && block)
-        {
-            const InlineFunctionInfo *inline_info = block->GetInlinedFunctionInfo();
-            if (inline_info == NULL)
-            {
-                const Block *parent_inline_block = block->GetInlinedParent();
-                if (parent_inline_block)
-                    inline_info = parent_inline_block->GetInlinedFunctionInfo();
-            }
-
-            if (inline_info)
-            {
-                s->PutCString(" [inlined] ");
-                inline_info->GetName().Dump(s);
-                
-                if (line_entry.IsValid())
-                {
-                    s->PutCString(" at ");
-                    line_entry.DumpStopContext(s, show_fullpaths);
-                }
-                return;
-            }
-        }
         if (addr.IsValid())
         {
             const addr_t function_offset = addr.GetOffset() - function->GetAddressRange().GetBaseAddress().GetOffset();





More information about the lldb-commits mailing list