Skip to content
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

GDB Debugging Issue: using 'c' and then pressing CTRL + C in GDB points to wrong file #514

Open
hYdos opened this issue Nov 26, 2022 · 2 comments

Comments

@hYdos
Copy link

hYdos commented Nov 26, 2022

When using the c command in GDB to get the program to continue, GDB for some reason tried pointing to /home/fincs/git/pacman-packages/libctru/src/libctru-2.1.1/libctru/source/services/hid.c:

Full Logs:

Remote debugging using 192.168.0.101:4003
0x00100000 in _start ()
(gdb) c
Continuing.
[New Thread 48.392]

Thread 1 received signal SIGINT, Interrupt.
0x00107004 in ctru::services::hid::Hid::keys_held (self=0x81ffd9c) at src\services/hid.rs:92
92                  KeyPad::from_bits_truncate(keys)
(gdb) c
Continuing.

Thread 1 received signal SIGINT, Interrupt.
0x00104884 in hidScanInput ()
    at /home/fincs/git/pacman-packages/libctru/src/libctru-2.1.1/libctru/source/services/hid.c:204
204     /home/fincs/git/pacman-packages/libctru/src/libctru-2.1.1/libctru/source/services/hid.c: No such file or directory.
@oreo639
Copy link
Contributor

oreo639 commented Nov 26, 2022

That's is the debug information from when it was compiled, you can still check what line you paused it on using the file and line number.

@ian-h-chamberlain
Copy link
Contributor

The easiest way to deal with this in my experience is to use a local checkout of libctru and set substitute-path: https://sourceware.org/gdb/onlinedocs/gdb/Source-Path.html#Source-Path

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants