[Lldb-commits] [lldb] r188604 - Follow-up to the checkin of r188532 -- make sure that

Jason Molenda jmolenda at apple.com
Fri Aug 16 20:39:52 PDT 2013


Author: jmolenda
Date: Fri Aug 16 22:39:52 2013
New Revision: 188604

URL: http://llvm.org/viewvc/llvm-project?rev=188604&view=rev
Log:
Follow-up to the checkin of r188532 -- make sure that
we've read the ObjectFile's Symtab before we change the
File addresses in the Sections.

Modified:
    lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp

Modified: lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp?rev=188604&r1=188603&r2=188604&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp Fri Aug 16 22:39:52 2013
@@ -1106,6 +1106,15 @@ ObjectFileMachO::CreateSections (Section
                                     // yet the addresses in the new symbol file will still be unslid.
                                     // Since everything is stored as section offset, this shouldn't
                                     // cause any problems.
+
+                                    // Make sure we've parsed the symbol table from the 
+                                    // ObjectFile before we go around changing its Sections.
+                                    module_sp->GetObjectFile()->GetSymtab();
+                                    // eh_frame would present the same problems but we parse that on
+                                    // a per-function basis as-needed so it's more difficult to
+                                    // remove its use of the Sections.  Realistically, the environments
+                                    // where this code path will be taken will not have eh_frame sections.
+
                                     unified_section_sp->SetFileAddress(load_cmd.vmaddr);
                                 }
                             }





More information about the lldb-commits mailing list