Bug 1771142 - gdb fails to set breakpoint on binary compiler from souce which is a symbolic link to a file with different name
Summary: gdb fails to set breakpoint on binary compiler from souce which is a symbolic...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Developer Toolset
Classification: Red Hat
Component: gdb
Version: DTS 9.0 RHEL 6
Hardware: All
OS: Linux
medium
high
Target Milestone: alpha
: 9.0
Assignee: Keith Seitz
QA Contact: Martin Cermak
URL:
Whiteboard:
Depends On: 1639077 1750470
Blocks: 1771136 1771138 1771140
TreeView+ depends on / blocked
 
Reported: 2019-11-11 21:48 UTC by Keith Seitz
Modified: 2019-12-13 22:31 UTC (History)
16 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1750470
Environment:
Last Closed: 2019-12-13 22:31:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Comment 3 David Smith 2019-12-13 22:31:17 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.
====


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