[swift-lldb-dev] Support for the Swift calling convention in lldb

Michael Ilseman milseman at apple.com
Fri Oct 14 13:35:07 CDT 2016


Conventions are part of the mangling, as least as described in:

https://github.com/apple/swift/blob/master/docs/ABI.rst#mangling

We can also adapt the mangling if need be.


> On Oct 14, 2016, at 10:16 AM, Adrian Prantl via swift-lldb-dev <swift-lldb-dev at swift.org> wrote:
> 
> Could they be safely identified by their mangled name? Do they have a unique prefix?
> 
> -- adrian
>> On Oct 14, 2016, at 10:14 AM, Arnold Schwaighofer <aschwaighofer at apple.com> wrote:
>> 
>> No, this is not the case. Objective-C method thunks use the _T prefix and follow the c calling convention.
>> 
>>> On Oct 13, 2016, at 1:10 PM, Adrian Prantl <aprantl at apple.com> wrote:
>>> 
>>> My understanding was that once Swift switches to the new calling convention, every function in the Swift namespace (^_T.*) would implicitly use the Swift calling convention. If this assertion should for some reason not be true, we will have to decorate the functions in DWARF with a calling convention attribute.
>>> 
>>> -- adrian
>>>> On Oct 13, 2016, at 1:06 PM, Arnold Schwaighofer <aschwaighofer at apple.com> wrote:
>>>> 
>>>> 
>>>>> On Oct 13, 2016, at 12:47 PM, Todd Fiala <tfiala at apple.com> wrote:
>>>>> 
>>>>> e identify C/C++ code that was using this calling convention?
>>>> 
>>>> I think, llvm would have to mark such functions with a DWARF entry?
>>>> 
>>>> I don’t know how much DWARF info generated by a clang that supports swiftcc would shield an older lldb from having to know about that the function call was swiftcc.
>>> 
>> 
> 
> _______________________________________________
> swift-lldb-dev mailing list
> swift-lldb-dev at swift.org
> https://lists.swift.org/mailman/listinfo/swift-lldb-dev



More information about the swift-lldb-dev mailing list