From: ahesford <ahesford@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [ISSUE] [CLOSED] gdb libstdc++ frame gives warning: <line> <file>.h: No such file or directory
Date: Thu, 14 Mar 2024 12:48:54 +0100 [thread overview]
Message-ID: <20240314114854.130A820268@inbox.vuxu.org> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-49207@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 1934 bytes --]
Closed issue by meator on void-packages repository
https://github.com/void-linux/void-packages/issues/49207
Description:
### Is this a new report?
Yes
### System Info
Void 6.6.18_1 x86_64 GenuineIntel uptodate hold rrrdDFFFFFFFFFFFFFFFFFFFFFFFFFFFF
### Package(s) Affected
libstdc++-13.2.0_2 libstdc++-devel-13.2.0_2 libstdc++-dbg-13.2.0_2
### Does a report exist for this bug with the project's home (upstream) and/or another distro?
_No response_
### Expected behaviour
Everything being all right.
### Actual behaviour
I have the following program:
```c++
#include <string>
int main() {
std::string{std::string{}};
}
```
When I compile it with
```
g++ -ggdb main.cpp
```
, debug it with `gdb` and try to step in the fourth line, I get
```
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string (this=0x7fffffffe590)
at ./build/x86_64-unknown-linux-gnu/libstdc++-v3/include/bits/basic_string.h:512
warning: 512 ./build/x86_64-unknown-linux-gnu/libstdc++-v3/include/bits/basic_string.h: No such file or directory
```
`gdb` is trying to look into `./build/x86_64-unknown-linux-gnu/libstdc++-v3/include/bits/basic_string.h`, but it should be looking in `/usr/include/c++/13.2/bits/basic_string.h`.
This looks like `./build/x86_64-unknown-linux-gnu/libstdc++-v3/include/bits/basic_string.h` was the path in the build step of `libstdc++` (which is a subpackage of `gcc`) in the masterdir. This path doesn't match the path in a real installed system, which rightfully confuses gdb.
I have `libstdc++-13.2.0_2` `libstdc++-devel-13.2.0_2` and `libstdc++-dbg-13.2.0_2` installed, so I shouldn't be lacking debugging symbols.
### Steps to reproduce
I have first created this recording with slightly different code and it was intended for `#voidlinux`, but it is still relevant and useful: https://asciinema.org/a/646146
next prev parent reply other threads:[~2024-03-14 11:48 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-09 20:32 [ISSUE] gdb can't step in libstdc++ meator
2024-03-09 20:50 ` meator
2024-03-09 22:33 ` oreo639
2024-03-09 22:44 ` oreo639
2024-03-09 22:44 ` oreo639
2024-03-10 2:04 ` oreo639
2024-03-10 2:05 ` oreo639
2024-03-10 2:21 ` oreo639
2024-03-10 6:49 ` meator
2024-03-10 6:55 ` meator
2024-03-10 7:17 ` oreo639
2024-03-10 7:22 ` oreo639
2024-03-10 7:34 ` gdb libstdc++ frame gives warning: <line> <file>.h: No such file or directory oreo639
2024-03-10 7:37 ` oreo639
2024-03-10 7:50 ` oreo639
2024-03-14 11:48 ` ahesford
2024-03-14 11:48 ` ahesford [this message]
2024-03-14 17:40 ` meator
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240314114854.130A820268@inbox.vuxu.org \
--to=ahesford@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).