Github messages for voidlinux
 help / color / mirror / Atom feed
* [ISSUE] gdb can't step in libstdc++
@ 2024-03-09 20:32 meator
  2024-03-09 20:50 ` meator
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: meator @ 2024-03-09 20:32 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1762 bytes --]

New 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.

### 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

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2024-03-14 17:40 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [ISSUE] [CLOSED] " ahesford
2024-03-14 17:40 ` meator

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).