Bug 1186476

Summary: backport GDB 7.4 fix to RHEL 6.6 GDB
Product: Red Hat Enterprise Linux 6 Reporter: Paulo Andrade <pandrade>
Component: gdbAssignee: Sergio Durigan Junior <sergiodj>
Status: CLOSED ERRATA QA Contact: Miroslav Franc <mfranc>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.7CC: gdb-bugs, jan.kratochvil, juanino, mcermak, mfranc, ohudlick, palves
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: gdb-7.2-81.el6 Doc Type: Bug Fix
Doc Text:
Cause: When a breakpoint was pending (i.e., its location had not been resolved yet) and a new object file appeared (e.g., when a shared library is loaded), if this new object file contained multiple possible locations for the breakpoint (e.g., overloaded methods in C++), GDB was being too strict on checking this condition, and would issue an internal error if this scenario was found. A possible workaround for this issue would be to explicitly specify the location for the breakpoint. For example, if the code defines two functions 'f ()' and 'f (int)', the user could insert a breakpoint on each one by issuing, respectively, break 'f ()' and break 'f (int)' (note the single quotes around the functions). Consequence: This internal error would affect the user experience, causing GDB to display an unnecessarily urgent message that would lead the user to stop debugging. Fix: The check for multiple locations for the same breakpoint has been relaxed, and GDB does not issue an internal error in this scenario anymore. Result: The user will receive a warning mentioning that more than one location for the breakpoint has been found, but only one location will be used. The debugging experience is not affected and the user can continue working with GDB without any problems.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-22 06:34:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Description Flags
simple test case none

Description Paulo Andrade 2015-01-27 18:22:02 UTC
The actual fix may not be too easy to find, as it
should be somewehere in the patches listed at

Comment 1 Paulo Andrade 2015-01-27 18:23:14 UTC
Created attachment 984813 [details]
simple test case

Comment 3 Paulo Andrade 2015-02-09 16:49:33 UTC
Just to make it clear, the customer wants strictly the
bug described in comments 1 and 2 of the sourceware

Unfortunately, it appears to have been corrected in
a quite large cvs commit, so it may not be trivial
to find what commit actually corrected it.

The problem does not happen in recent fedora or

Comment 4 Sergio Durigan Junior 2015-02-16 19:12:12 UTC
We investigated this bug, and the conclusion is that the patch to fix the issue is too big to be backported safely for 6.7.  We cannot afford applying it and causing an obscure regression elsewhere.

The fix that I proposed (suggested by Jan Kratochvil) is to replace the assertion by a warning, which would not crash GDB and therefore would not impact the debugging session.

Also, it is worth mentioning that, for a more advanced debugging experience with C++, there is the DTS version of GDB.

Comment 5 Jan Kratochvil 2015-02-16 19:21:44 UTC
That is removing the assertion will make the breakpoint placed only one instanced of a constructor/destructor; execution of other instances will miss the breakpoint.

The warning's printing should be also limited somehow (per struct breakpoint?) otherwise it would get printed on each shared library load.

Comment 9 errata-xmlrpc 2015-07-22 06:34:37 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.