[Lldb-commits] [lldb] r141348 - /lldb/trunk/source/Symbol/SymbolContext.cpp

Greg Clayton gclayton at apple.com
Thu Oct 6 18:49:45 PDT 2011


Author: gclayton
Date: Thu Oct  6 20:49:45 2011
New Revision: 141348

URL: http://llvm.org/viewvc/llvm-project?rev=141348&view=rev
Log:
Added better logging for the case where we don't find a PC in a block.


Modified:
    lldb/trunk/source/Symbol/SymbolContext.cpp

Modified: lldb/trunk/source/Symbol/SymbolContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/SymbolContext.cpp?rev=141348&r1=141347&r2=141348&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/SymbolContext.cpp (original)
+++ lldb/trunk/source/Symbol/SymbolContext.cpp Thu Oct  6 20:49:45 2011
@@ -15,6 +15,7 @@
 #include "lldb/Symbol/CompileUnit.h"
 #include "lldb/Symbol/ObjectFile.h"
 #include "lldb/Symbol/Symbol.h"
+#include "lldb/Symbol/SymbolFile.h"
 #include "lldb/Symbol/SymbolVendor.h"
 #include "lldb/Target/Target.h"
 
@@ -565,8 +566,32 @@
 #ifdef LLDB_CONFIGURATION_DEBUG
                 else
                 {
-                    fprintf (stderr, "warning: inlined block 0x%8.8x doesn't have a range that contains file address 0x%llx\n", 
-                             curr_inlined_block->GetID(), curr_frame_pc.GetFileAddress());
+                    ObjectFile *objfile = NULL;
+                    if (module_sp)
+                    {
+                        SymbolVendor *symbol_vendor = module_sp->GetSymbolVendor();
+                        if (symbol_vendor)
+                        {
+                            SymbolFile *symbol_file = symbol_vendor->GetSymbolFile();
+                            if (symbol_file)
+                                objfile = symbol_file->GetObjectFile();
+                        }
+                    }
+                    if (objfile)
+                    {
+                        fprintf (stderr, "warning: inlined block 0x%8.8x doesn't have a range that contains file address 0x%llx in %s/%s\n", 
+                                 curr_inlined_block->GetID(), 
+                                 curr_frame_pc.GetFileAddress(),
+                                 objfile->GetFileSpec().GetDirectory().GetCString(),
+                                 objfile->GetFileSpec().GetFilename().GetCString());
+                        
+                        curr_inlined_block->GetRangeContainingAddress (curr_frame_pc, range); // REMOVE THIS!!!
+                    }
+                    else
+                    {
+                        fprintf (stderr, "warning: inlined block 0x%8.8x doesn't have a range that contains file address 0x%llx\n", 
+                                 curr_inlined_block->GetID(), curr_frame_pc.GetFileAddress());
+                    }
                 }
 #endif
             }





More information about the lldb-commits mailing list