Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1785768 - Paths for breakpoints are not resolved
Summary: Paths for breakpoints are not resolved
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gdb
Version: 31
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Sergio Durigan Junior
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-12-20 21:17 UTC by Sergio Durigan Junior
Modified: 2020-02-20 05:03 UTC (History)
7 users (show)

Fixed In Version: gdb-8.3.50.20190824-26.fc31 gdb-8.3.50.20190824-30.fc31
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-02-20 05:03:45 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Sergio Durigan Junior 2019-12-20 21:17:28 UTC
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.

Comment 1 Michael Katzmann 2019-12-21 00:03:21 UTC
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.

Comment 2 Fedora Update System 2020-01-06 21:07:54 UTC
FEDORA-2020-8138116c32 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-8138116c32

Comment 3 Fedora Update System 2020-01-07 01:08:13 UTC
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

Comment 4 Michael Katzmann 2020-01-08 00:15:15 UTC
I've tested this and the problem that manifested itself in Eclipse is corrected with gdb-8.3.50.20190824-26.fc31

Comment 5 Fedora Update System 2020-01-13 02:19:48 UTC
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.

Comment 6 Michael Katzmann 2020-01-30 13:30:32 UTC
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).

Comment 7 Sergio Durigan Junior 2020-01-30 16:53:15 UTC
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.

Comment 8 Michael Katzmann 2020-01-31 20:29:39 UTC
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)

Comment 9 Michael Katzmann 2020-02-04 00:27:46 UTC
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

Comment 10 Sergio Durigan Junior 2020-02-10 21:02:37 UTC
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.

Comment 11 Sergio Durigan Junior 2020-02-10 21:18:50 UTC
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.

Comment 12 Michael Katzmann 2020-02-10 21:49:13 UTC
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)

Comment 13 Sergio Durigan Junior 2020-02-10 22:45:35 UTC
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.

Comment 14 Fedora Update System 2020-02-11 20:46:50 UTC
FEDORA-2020-d606156d7a has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-d606156d7a

Comment 15 Fedora Update System 2020-02-12 01:57:41 UTC
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

Comment 16 Fedora Update System 2020-02-20 05:03:45 UTC
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.


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