[Dwarf-Discuss] compilers generating ABI non-compliant function calls?

David Blaikie dblaikie@gmail.com
Wed Mar 10 21:28:34 GMT 2021


On Wed, Mar 10, 2021 at 1:21 PM Cary Coutant <ccoutant at gmail.com> wrote:

> > Speculation beyond the original question:
> > Given that it's a pretty common/core feature of a debugger to call
> functions, perhaps a start would be some way for the producer to
> communicate, via DWARF, that it has changed the ABI of a function and so
> the consumer should not try to synthesize calls to it. Providing much more
> functionality than that I think will amount to encoding the ad-hoc ABIs
> that compilers create in these situations (possible, but a fairly
> non-trivial proposal/enhancement to DWARF)
>
> I believe that's what DW_AT_calling_convention and DW_CC_nocall are
> for (Section 3.3.1.1).
>

Oh, sweet - yep, that looks like the ticket indeed.

"If the value of the calling convention attribute is the constant
DW_CC_nocall, the subroutine does not obey standard calling conventions,
and it may not be safe for the debugger to call this subroutine."

- Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dwarfstd.org/pipermail/dwarf-discuss-dwarfstd.org/attachments/20210310/13b61203/attachment.html>



More information about the Dwarf-discuss mailing list