|Summary:||backport GDB 7.4 fix to RHEL 6.6 GDB|
|Product:||Red Hat Enterprise Linux 6||Reporter:||Paulo Andrade <pandrade>|
|Component:||gdb||Assignee:||Sergio Durigan Junior <sergiodj>|
|Status:||CLOSED ERRATA||QA Contact:||Miroslav Franc <mfranc>|
|Version:||6.7||CC:||gdb-bugs, jan.kratochvil, juanino, mcermak, mfranc, ohudlick, palves|
|Fixed In Version:||gdb-7.2-81.el6||Doc Type:||Bug Fix|
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.
|Last Closed:||2015-07-22 06:34:37 UTC||Type:||Bug|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
|Cloudforms Team:||---||Target Upstream Version:|
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 https://sourceware.org/bugzilla/show_bug.cgi?id=11657#c3
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 report. 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 rhel-7.
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. https://rhn.redhat.com/errata/RHBA-2015-1325.html