[Bug gdb/31563] Problems with accessing errno
pedro at palves dot net
sourceware-bugzilla@sourceware.org
Mon May 13 15:05:10 GMT 2024
https://sourceware.org/bugzilla/show_bug.cgi?id=31563
--- Comment #5 from Pedro Alves <pedro at palves dot net> ---
Indeed. It has no pc range because it's a declaration (DW_AT_declaration).
It would also be interesting to test accessing errno in a program that never
references it. Like:
int main()
{
return 0; // stop here and access errno.
}
This models a program that actually calls some function that sets errno, but in
a different translation unit, potentially even in a library, and then the user
wants to inspect errno.
Does your testcase cover this scenario?
This reminded me of clang's -fstandalone-debug, which is on by default:
https://clang.llvm.org/docs/UsersManual.html#cmdoption-fstandalone-debug
which I guess could also affect some of these scenarios.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Gdb-prs
mailing list