-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Missing DW_OP_deref for non-trivial return by value #33861
Comments
assigned to @rnk |
Hmm.. I couldn't reproduce this my system compiler (apple-clang-802) and lldb so perhaps this is a recent regression? With I get 0x00000055: TAG_variable [4] and can reproduce the bug in lldb. I'll bisect now. |
Looks like I broke this myself :-( [clang] Debug Info: Remove special-casing of indirect function argument handling. LLVM has changed the semantics of dbg.declare for describing function #31729 git-original-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300523 Once I have a fix, I will add a variant of this test to the debuginfo-tests to avoid regressing again. |
IMO the fix for this will live in LLVM, I've fixed this bug several times now while iterating on https://reviews.llvm.org/D37311. My current patch uses DW_OP_LLVM_memory, but I'm not happy with it. |
Yes, that would be in line with the commit message and the intention of the LLVM patch (r642022) that the message is referring to. |
After r313400 and r313399 this should work both in -O0 and in many cases when optimized. I added a debuginfo-tests test in r313401, so hopefully this doesn't regress. |
*** Bug llvm/llvm-bugzilla-archive#35654 has been marked as a duplicate of this bug. *** |
mentioned in issue llvm/llvm-bugzilla-archive#35654 |
Extended Description
Try this in a debugger:
struct string {
string() {}
string(int i) : i(i) {}
~string() {}
int i = 0;
};
string get_string() {
string unused;
string result = 3;
return result;
}
int main() { get_string(); }
$ clang++ -g -fno-exceptions str.cpp
$ gdb ./a.out
b 10
r
p result
p (string)result
Looks like there's a missing DW_OP_deref in here somehow.
The text was updated successfully, but these errors were encountered: