You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DWARF's DW_AT_object_pointer indicates which DW_TAG_formal_parameter corresponds to the function object that the method is being called on.
One motivator for this attribute from the original proposal is that it can be used to determine whether a C++ method is static or not. LLDB does need to distinguish static vs. non-static methods, but can't rely on DW_AT_object_pointer at the moment because Clang does not emit it on the declaration DIE (only on the definition). GCC emits it on both. See https://godbolt.org/z/3TWjTfWon
So LLDB currently relies on the existence of a DW_TAG_formal_parameter called this and that it is a pointer type. With C++23, we can't rely on either of these being true because of the deducing this feature: https://godbolt.org/z/h4jeT54G5 (though there's a bug in both Clang and GCC here where we don't emit the DW_AT_object_pointer for an explicit object parameter, will raise a separate issue for it)
This issue proposes adding the DW_AT_object_pointer to declarations too.
The text was updated successfully, but these errors were encountered:
[DWARF's `DW_AT_object_pointer`](https://dwarfstd.org/issues/050711.2.html) indicates which `DW_TAG_formal_parameter` corresponds to the function object that the method is being called on.
One motivator for this attribute from the original proposal is that it can be used to determine whether a C++ method is static or not. LLDB does need to distinguish static vs. non-static methods, but can't rely on DW_AT_object_pointer at the moment because Clang does not emit it on the declaration DIE (only on the definition). GCC emits it on both. See https://godbolt.org/z/3TWjTfWon
So LLDB currently relies on the existence of a DW_TAG_formal_parameter called this and that it is a pointer type. With C++23, we can't rely on either of these being true because of the deducing this feature: https://godbolt.org/z/h4jeT54G5 (though there's a bug in both Clang and GCC here where we don't emit the DW_AT_object_pointer for an explicit object parameter, will raise a separate issue for it)
This issue proposes adding the DW_AT_object_pointer to declarations too.
DWARF's
DW_AT_object_pointer
indicates whichDW_TAG_formal_parameter
corresponds to the function object that the method is being called on.One motivator for this attribute from the original proposal is that it can be used to determine whether a C++ method is static or not. LLDB does need to distinguish static vs. non-static methods, but can't rely on
DW_AT_object_pointer
at the moment because Clang does not emit it on the declaration DIE (only on the definition). GCC emits it on both. See https://godbolt.org/z/3TWjTfWonSo LLDB currently relies on the existence of a
DW_TAG_formal_parameter
calledthis
and that it is a pointer type. With C++23, we can't rely on either of these being true because of thededucing this
feature: https://godbolt.org/z/h4jeT54G5 (though there's a bug in both Clang and GCC here where we don't emit theDW_AT_object_pointer
for an explicit object parameter, will raise a separate issue for it)This issue proposes adding the
DW_AT_object_pointer
to declarations too.The text was updated successfully, but these errors were encountered: