[Lldb-commits] [lldb] r270618 - In r268475 I made a change to ObjectFileMachO so that if it is

Jason Molenda via lldb-commits lldb-commits at lists.llvm.org
Tue May 24 14:46:23 PDT 2016

Author: jmolenda
Date: Tue May 24 16:46:23 2016
New Revision: 270618

URL: http://llvm.org/viewvc/llvm-project?rev=270618&view=rev
In r268475 I made a change to ObjectFileMachO so that if it is
missing an LC_FUNCTION_STARTS section, we assume it has been
aggressively stripped (it is *very* unusual for anyone to strip
LC_FUNCTION_STARTS) so we disable assembly instruction unwind plan

Kernel extensions (kexts) don't have LC_FUNCTION_STARTS, but we
almost always have good symbol bounds just with the linker symbols.
So add an exception to allow assembly instruction unwind plan
creation for kexts even though they lack LC_FUNCTION_STARTS.



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=270618&r1=270617&r2=270618&view=diff
--- lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp Tue May 24 16:46:23 2016
@@ -2607,7 +2607,10 @@ ObjectFileMachO::ParseSymtab ()
         const size_t function_starts_count = function_starts.GetSize();
-        if (function_starts_count == 0)
+        // kext bundles don't have LC_FUNCTION_STARTS / eh_frame sections, but we can assume that we have
+        // accurate symbol boundaries for them, they're a special case.
+        if (function_starts_count == 0 && header.filetype != MH_KEXT_BUNDLE)
             // No LC_FUNCTION_STARTS/eh_frame section in this binary, we're going to assume the binary 
             // has been stripped.  Don't allow assembly language instruction emulation because we don't

More information about the lldb-commits mailing list