unwind tables for asm blocks

J.W. Jagersma jwjagersma@gmail.com
Fri Feb 28 22:32:00 GMT 2020

On 2020-02-28 22:32, Florian Weimer wrote:
> * J. W. Jagersma:
>> The call instruction is just a practical example. The problem I want to
>> address is that no exception handling information is generated at all
>> for asm statements. Other operations, eg. memory access, division, etc
>> could trap and throw an exception. The unwind tables should cover this.
> I think permitted uses of asm cannot do anything that would make the
> tables invalid, at least for DWARF unwinding information.

I don't see how a trapping instruction in asm would invalidate the
unwind table. An explicit call, maybe, but as I said that was only an
example. The problem is that there is no unwind table at all.

> DWARF does not need to annotate any instruction that might throw (which
> would be every instruction in case of asynchronous unwind tables).

But it should, if the instruction appears in a try block. Without that
it is impossible to catch the exception.

More information about the Gcc-help mailing list