gnustep / libobjc2

Objective-C runtime library intended for use with Clang.
http://www.gnustep.org/
MIT License
434 stars 118 forks source link

Add debug support symbols #244

Open weliveindetail opened 1 year ago

weliveindetail commented 1 year ago

Proper ObjC support in debuggers requires the runtime to provide a few support symbols. Grepping the Apple V2 runtime in upstream LLDB brings up these candidates:

I am not sure whether the referenced open-source declaration are the relevant sources or whether they are up-to-date.

davidchisnall commented 1 year ago

My understanding is that gdb_object_getClass is equivalent to object_getClass but doesn't acquire locks. Our implementation of this class never acquires locks, so we probably don't need it. I'm not sure what the others are for. I think the tampoline ones are specifically related to how Apple implements the objc_msgSend family, so I'd need to understand what the debugger wants from these to see what an equivalent would look like. gdb_objc_realized_classes depends on NXHashTable, which we don't implement (and I thought Apple removed with ObjC2).