Bug 2435950 - gdb 17.1 can't step into functions
Summary: gdb 17.1 can't step into functions
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gdb
Version: 43
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Guinevere Larsen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-02-02 12:24 UTC by Tom Hughes
Modified: 2026-02-27 01:35 UTC (History)
9 users (show)

Fixed In Version: gdb-17.1-3.fc43
Clone Of:
Environment:
Last Closed: 2026-02-15 01:12:46 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Test program (134 bytes, text/plain)
2026-02-02 12:25 UTC, Tom Hughes
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Sourceware 33872 0 P2 NEW `skip -gfile` has inverted logic. 2026-02-03 10:17:34 UTC

Description Tom Hughes 2026-02-02 12:24:38 UTC
Description of problem:

It appears that stepping into a function doesn't work in gdb 17.1 and you instead step over it.

Version-Release number of selected component (if applicable):

gdb-17.1-1.fc43.x86_64

Steps to Reproduce:
1. Compile attached test with "gcc -Wall -g -o gdb-test gdb-test.c"
2. Run gdb on the result with "gdb gdb-test"
3. Set a breakpoint in main with "b main"
4. Run with "run"
5. Step into function with "step"

Actual results:

We step over foo.

Expected results:

We should step into foo.

Additional info:

bericote [/tmp] % gcc -Wall -g -o gdb-test gdb-test.c 
bericote [/tmp] % gdb gdb-test 
GNU gdb (Fedora Linux) 17.1-1.fc43
Copyright (C) 2025 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
❌️ No symbol table is loaded.  Use the "file" command.
Breakpoint 1 (__sanitizer::Die) pending.
File(s) /usr/include/c++/*/*/* will be skipped when stepping.
File(s) /usr/include/c++/*/* will be skipped when stepping.
File(s) /usr/include/c++/* will be skipped when stepping.
Reading symbols from gdb-test...
(gdb) b main
Breakpoint 2 at 0x400486: file gdb-test.c, line 12.
(gdb) run
Starting program: /tmp/gdb-test 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Breakpoint 2, main (argc=1, argv=0x7fffffffdc78) at gdb-test.c:12
12	  foo();
(gdb) step
foo
14	  return 0;

Comment 1 Tom Hughes 2026-02-02 12:25:07 UTC
Created attachment 2127830 [details]
Test program

Comment 2 Tom Hughes 2026-02-02 12:26:45 UTC
Downgrading to gdb-16.3-6.fc43.x86_64 gets things working again.

Comment 3 Guinevere Larsen 2026-02-02 13:32:58 UTC
Hello! Thank you for reporting this.

With the provided instructions, I can't reproduce this bug locally. However, I noticed that your GDB session has a few commands not listed (specifically the following lines:
❌️ No symbol table is loaded.  Use the "file" command.
Breakpoint 1 (__sanitizer::Die) pending.
File(s) /usr/include/c++/*/*/* will be skipped when stepping.
File(s) /usr/include/c++/*/* will be skipped when stepping.
File(s) /usr/include/c++/* will be skipped when stepping.
)

This indicates that you have either a gdbinit or gdbearlyinit file that is being processed and was not provided. I believe that some command there is responsible for the incorrect behavior, could you check it for any data you wouldn't want shared, then attach to this bug, please?

Comment 4 Tom Hughes 2026-02-02 13:37:26 UTC
Indeed... It seems that this is the culprit:

# Skip over standard library routines
skip -gfi /usr/include/c++/*/*/*
skip -gfi /usr/include/c++/*/*
skip -gfi /usr/include/c++/*

Not that any of those match the file we are trying to step into...

Comment 5 Guinevere Larsen 2026-02-02 13:42:24 UTC
Yes, with those I do reproduce the problem. I'll chat to the other GDB engineers and we'll start looking into it!

Comment 6 Fedora Update System 2026-02-13 22:39:34 UTC
FEDORA-2026-0630a7be2f (gdb-17.1-3.fc43) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-0630a7be2f

Comment 7 Fedora Update System 2026-02-14 01:30:32 UTC
FEDORA-2026-0630a7be2f has been pushed to the Fedora 43 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-0630a7be2f`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-0630a7be2f

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2026-02-15 01:12:46 UTC
FEDORA-2026-0630a7be2f (gdb-17.1-3.fc43) has been pushed to the Fedora 43 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 9 Fedora Update System 2026-02-26 06:10:35 UTC
FEDORA-2026-8977c2c199 (gdb-17.1-4.fc44) has been submitted as an update to Fedora 44.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-8977c2c199

Comment 10 Fedora Update System 2026-02-27 01:35:54 UTC
FEDORA-2026-8977c2c199 has been pushed to the Fedora 44 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-8977c2c199`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-8977c2c199

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.


Note You need to log in before you can comment on or make changes to this bug.