Where is LDSA created?

kinke noone at nowhere.com
Sun Jul 5 11:19:44 UTC 2020


On Sunday, 5 July 2020 at 09:31:25 UTC, Denis Feklushkin wrote:
> On Thursday, 2 July 2020 at 11:29:45 UTC, Denis Feklushkin 
> wrote:
>> On Thursday, 2 July 2020 at 10:36:58 UTC, Johan wrote:
>>
>>> The exception tables are generated by LLVM (it is safe to 
>>> assume that everything that is done by 
>>> `dmd/src/dmd/backend/...` is done by LLVM for LDC).
>>
>> LSDA is about language-specific data. It is generated by LLVM 
>> too?
>> You mean that LLVM calls some callback to druntime for LSDA 
>> creation?
>>
>> grep isn't displays anything related to LSDA creation in ldc 
>> sources. Only druntime's scanLSDA.
>
> LSDA is generated at compile-time, yes? Or I understand 
> something wrong?

The EH tables (yes, that's what LSDA is, don't be fooled by its 
name) are static and generated by LLVM as Johan already 
mentioned, quite obviously without any druntime involvement. [The 
-exception-model you've been playing with probably affect their 
format.] Traversing these EH tables during stack unwinding (at 
runtime) is the job of the EH personality function associated 
with a function.


More information about the digitalmars-d-ldc mailing list