This bug is a mirror of upstream's https://sourceware.org/bugzilla/show_bug.cgi?id=24915. It's been fixed upstream, and I'm creating this to track the backport to F31 GDB. Jonah Graham from Eclipse CDT contacted me and let me know that the current GDB on F31 is not working with Eclipse. This bug is supposed to fix it.
I reported this bug to Eclipse not realizing that it was gdb related. The current version of GDB on Fedora 31 has a bug where it does not recognize that two paths are not functionally equal .. i.e. /home/michael/debug/../src & /home/michael/src The version of gdb currently on rawhide (gdb-9.0.50.20191119) works correctly.
FEDORA-2020-8138116c32 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-8138116c32
gdb-8.3.50.20190824-26.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-8138116c32
I've tested this and the problem that manifested itself in Eclipse is corrected with gdb-8.3.50.20190824-26.fc31
gdb-8.3.50.20190824-26.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.
I've found that this is not fully corrected. I'm using Eclipse CDT and I am seeing that initially the breakpoint is being correctly inserted; however, when the debugging session is ended and restarted the breakpoints again are shown as 'PENDING'. (they must be deleted and reinserted for each session).
Thanks for the heads up, Michael. I can't look at this right now; can you comment on the upstream bug, please? It would be good to know if Jonah can confirm this issue, since he works with CDT.
OK, I did so ... this is what I have seen... Using gdb with Eclipse CDT, the breakpoint is set (by the Eclipse GUI) properly only if it is in the initial file (containing main). If it is in another source file I get a'<PENDING> address. e.g. I have a source file (test.c) containing the main entry point and another (test2.c). I set a break point in both files... (and looking with the 'Debugger Console' (gdb) info break Num Type Disp Enb Address What 2 breakpoint keep y 0x0000000000401134 in main at ../src/test.c:18 3 breakpoint keep y <PENDING> /home/michael/eclipse-workspace/test/src/test2.c:9 (gdb) GNU gdb (GDB) Fedora 8.3.50.20190824-27.fc31 (also tried with ... GNU gdb (GDB) Fedora 9.0.50.20191119-2.fc31 with similar results) The Eclipse folks say that this is a gdb issue.... I can set the breakpoint with the command line (although it curiously sets 2 additional breakpoints)... (gdb) break test2.c:8 Breakpoint 4 at 0x401150: file ../src/test2.c, line 8. (gdb) info break Num Type Disp Enb Address What 2 breakpoint keep y 0x0000000000401134 in main at ../src/test.c:18 3 breakpoint keep y <PENDING> /home/michael/eclipse-workspace/test/src/test2.c:9 4 breakpoint keep y 0x0000000000401150 in externalProc at ../src/test2.c:8 5 breakpoint keep y 0x0000000000401150 in externalProc at ../src/test2.c:8 (gdb)
Just a heads up on this. Jonah was able to reproduce the issue and its a blocker for the 9.1 gdb release. So, either it is corrected or the original patch that caused the problem will be backed out until a solution is found. Jonah provided a work around in the mean time (and this does work with the FC31 testing RPM). https://sourceware.org/bugzilla/show_bug.cgi?id=24915#c15
I'm reopening this bug, since it's still valid. I'll be pushing a "fix" (which is actually the revert of the upstream commit) soon.
Can you guys please test this scratch build (for F31) and confirm that it solves the problem? https://koji.fedoraproject.org/koji/taskinfo?taskID=41452296 If everything is OK, I'll push it to the repo. Thanks in advance.
I've confirmed that the bug in comment 6 is resolved with the GDB revert. The breakpoints work in all the files (not just the initial file) without the workaround. ( tested with gdb-8.3.50-20190824-29.fc31.x86_64)
Thanks for confirming, Michael. I'm waiting for the full regression test to finish now. Once that is done, I'll upload the new package.
FEDORA-2020-d606156d7a has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-d606156d7a
gdb-8.3.50.20190824-30.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-d606156d7a
gdb-8.3.50.20190824-30.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.