[lldb-dev] What is the concept behind AppleObjCTrampolineHandler::AppleObjCVTables ?

Jim Ingham via lldb-dev lldb-dev at lists.llvm.org
Thu May 18 10:33:47 PDT 2017


One of the strategies for speeding up ObjC dispatch was for the runtime to include a vtable that did direct dispatch for some very common methods (e.g. -[NSArray count]).  Since method dispatch is dynamic, we always have to figure out the implementation for a given selector, so we had to be able to detect & decode these vtables.  That strategy is no longer used in recent versions of the ObjC runtime.  It's been a couple of years now, so it's about time to declare that we no longer support older versions of OS X that still have the feature, and take it out. Why do you ask?

Jim



> On May 18, 2017, at 7:57 AM, Nat! via lldb-dev <lldb-dev at lists.llvm.org> wrote:
> 
> 
> At first I thought it might have something to do with C++. But then I looked a little closer and then it looked like it is building up information about information contained in a linked list called "gdb_objc_trampolines".
> 
> A google search yields: https://opensource.apple.com/source/objc4/objc4-437/runtime/objc-gdb.h
> 
> But in the actual runtime, ojc4-709, I find only a reference to it in `libobjc.order`.
> 
> ```
> libobjc.order
> 32:_gdb_objc_trampolines_changed
> ```
> 
> So I'd like to know if AppleObjCVTables is just used for these apparently obsolete objc_trampoline_header structures, or if there is more to it.
> 
> Ciao
>   Nat!
> 
> 
> 
> 
> 
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev



More information about the lldb-dev mailing list