Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1771136

Summary: gdb fails to set breakpoint on binary compiler from souce which is a symbolic link to a file with different name
Product: Red Hat Enterprise Linux 8 Reporter: Keith Seitz <keiths>
Component: gdbAssignee: Keith Seitz <keiths>
gdb sub component: system-version QA Contact: qe-baseos-tools-bugs
Status: CLOSED WONTFIX Docs Contact:
Severity: high    
Priority: medium CC: bgollahe, dbasant, dsmith, gdb-bugs, jan.kratochvil, keiths, mcermak, mkolar, mnewsome, ohudlick, pandrade, pbhoot, qe-baseos-tools-bugs, sergiodj, tborcin
Version: 8.1Keywords: Regression, Triaged
Target Milestone: rc   
Target Release: 8.0   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1750470 Environment:
Last Closed: 2019-12-13 22:38:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1639077, 1750470, 1771138, 1771140, 1771142    
Bug Blocks:    

Comment 1 David Smith 2019-12-13 22:38:50 UTC
When using files with a symlink to a file with a different name, you have to use the GDB option 'basenames-may-differ'. Here's the related section from the GDB manual:

====
When processing file names provided by the user, GDB frequently needs to compare them to the file names recorded in the program’s debug info. Normally, GDB compares just the base names of the files as strings, which is reasonably fast even for very large programs. (The base name of a file is the last portion of its name, after stripping all the leading directories.) This shortcut in comparison is based upon the assumption that files cannot have more than one base name. This is usually true, but references to files that use symlinks or similar filesystem facilities violate that assumption. If your program records files using such facilities, or if you provide file names to GDB using symlinks etc., you can set basenames-may-differ to true to instruct GDB to completely canonicalize each pair of file names it needs to compare. This will make file-name comparisons accurate, but at a price of a significant slowdown.

set basenames-may-differ
Set whether a source file may have multiple base names.

show basenames-may-differ
Show whether a source file may have multiple base names.
====