Michael137 wrote:

On second thought, this is more a bug in the `-gmodules` debug-info generation 
than it is in LLDB. The changes to how we fetch the definitions for structures 
just exposed it. Put up a patch so `-gmodules` doesn't drop the 
`DW_AT_APPLE_runtime_class` from the forward declarations that it creates: 
https://github.com/llvm/llvm-project/pull/120154, which resolves this issue. It 
doesn't require any changes to LLDB (it seems like we don't need the 
`ObjCObjectOrInterfaceType` to have a definition in order to attach methods to 
it).

Though we might still need to do this eager definition fetching for users who 
can't recompile their objective-c codebases with newer compilers. Also, I'm not 
entirely sure this patch here is correct yet. I think the way it's currently 
written doesn't handle the case where we call `ParseStructureLikeDIE` with a 
forward declaration, and then later on with a definition DIE. For C++ 
structures we handle that by updating the UniqueTypeMap with the definition 
DIE, etc. We'll probably have to do what we do for enums and also put the 
definition DIE into the `DIEToType` map.

https://github.com/llvm/llvm-project/pull/119860
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to