-
Notifications
You must be signed in to change notification settings - Fork 12.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[lldb] Detection of this
arguments incomplete
#120856
Comments
@llvm/issue-subscribers-lldb Author: None (SingleAccretion)
I've encountered what seems like a bug in this code:
llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp Lines 3140 to 3147 in fd78472
In my case, the entry for "this" looked like this:
And was still picked up, despite the seeming intention of filtering out non-pointer arguments. |
Can you post the DWARF for the entire subprogram? And if possible also the source code. Are you using C++23's "deducing this" perhaps? What filtering are you referring to? The loop you linked will skip parsing any artificial parameter, including the one whose DWARF you showed. One problem I can see here though is that |
The full(er) DWARF is as follows, though I suspect it is not particularly useful:
While the source code for this is just an empty instance method in a C++ class ( From above, you can see there is a bug: the declaration and the definition do not match. In LLDB this manifested as my now-not-instance method still being shown as instance in That led me to this code in
I would expect the code's intent to have been to filter out non-pointer types from being - if (encoding_mask & Type::eEncodingIsPointerUID) {
+ if (encoding_mask & (1u << Type::eEncodingIsPointerUID)) { |
The issue can reproduced without the WASM transformation you're talking about using
So yes, this is definitely a bug that can occur with valid C++/DWARF.
But the suggested patch wouldn't be the solution here. The |
this
arguments?this
arguments incomplete
I raised following two issues:
IMO this would be the best way to resolve the issue you're seeing (of course we would still need to make LLDB actually use the |
Indeed. Of course, we (as in wasmtime) cannot rely on seeing 'new' output if/when it gets fixed, so we'll need to maintain a version of the current LLDB heuristic as well. Just to be clear though, this issue is originally about LLDB's logic not behaving as it was seemingly intended to. You write in #120973:
The "...and that it is a pointer type..." part is not how the code currently behaves -
As I alluded to in the previous comment, wasmtime transforms DWARF<WASM> to DWARF<native>. For
This doesn't work for |
Ah I see, I misunderstood our use of |
I've encountered what seems like a bug in this code:
llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
Lines 3140 to 3147 in fd78472
In my case, the entry for "this" looked like this:
And was still picked up, despite the seeming intention of filtering out non-pointer arguments.
The text was updated successfully, but these errors were encountered: