Open millenomi opened 5 years ago
dladdr will do this, although IIRC it's not very efficient about it.
This has two parts: getting an appropriate symbol for the class that is known to originate in the image, and then using it. The first bit requires some stdlib support.
Ah, gotcha. The appropriate symbol is the "nominal type descriptor", but the stdlib doesn't provide an easy way to get at that.
Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 0 | |Component/s | Foundation | |Labels | Bug | |Assignee | None | |Priority | Medium | md5: 8f9632f47485f4d3f6d48cdb3e059964blocks:
Issue Description:
To correct some of Bundle's swift-corelibs-foundation shortcomings, it would be useful to have a way to know, given an **AnyClass, which image on disk it is from.