Hardware watchpoints are not working on gdb from Fedora 17 (gdb-7.4.50.20120120-42.fc17.ppc64). The watchpoints are inserted but they don't get hit. This can be verified by running some of the watchpoints-related testcases from the GDB testsuite: $ make check-gdb RUNTESTFLAGS="gdb.base/watchpoints.exp" ... === gdb tests === Schedule of variations: unix Running target unix Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target. Using /usr/share/dejagnu/config/unix.exp as generic interface file for target. Using ../../../gdb/testsuite/config/unix.exp as tool-and-target-specific interface file. Running ../../../gdb/testsuite/gdb.base/watchpoints.exp ... FAIL: gdb.base/watchpoints.exp: watchpoint hit, first time FAIL: gdb.base/watchpoints.exp: watchpoint hit, first time FAIL: gdb.base/watchpoints.exp: Watchpoint hit count is 1 FAIL: gdb.base/watchpoints.exp: watchpoint ival1 hit, second time FAIL: gdb.base/watchpoints.exp: Watchpoint ival1 hit count is 2 FAIL: gdb.base/watchpoints.exp: watchpoint hit, second time FAIL: gdb.base/watchpoints.exp: Watchpoint hit count is 2 FAIL: gdb.base/watchpoints.exp: watchpoint ival1 hit, third time FAIL: gdb.base/watchpoints.exp: Watchpoint ival1 hit count is 3 FAIL: gdb.base/watchpoints.exp: watchpoint hit, third time (the program exited) FAIL: gdb.base/watchpoints.exp: Watchpoint hit count is 3 FAIL: gdb.base/watchpoints.exp: watchpoint hit, fourth time (the program is no longer running) FAIL: gdb.base/watchpoints.exp: Watchpoint hit count is 4 FAIL: gdb.base/watchpoints.exp: watchpoint hit, fifth time (the program is no longer running) === gdb Summary === # of expected passes 1 # of unexpected failures 14 == This bug happens due to a problem in the new ptrace BookE interface for PowerPC reported as available on recent versions of the kernel but still unusable on server processors. This patch fixes the this issue by checking if the ptrace BookE interface is functional, verifying the available 'features' retrieved from a ptrace PPC_PTRACE_GETHWDBGINFO call. If the new interface is not usable, gdb adopts the old ptrace mechanism (using PTRACE_SET_DEBUGREG) to set watchpoints. This change reduces the number of unexpected failures on the gdb testsuite from 258 to 136. The patch was recently included on upstream gdb: http://sourceware.org/ml/gdb-patches/2012-05/msg01107.html I've tested this patch against gdb testsuite from the F17 src package (gdb-7.4.50.20120120-42.fc17) and it fixes this problem, reducing the number of failures from 258 to 136. Thanks.
Created attachment 588574 [details] disable ptrace BookE interface for PowerPC server processors
gdb-7.4.50.20120120-48.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/gdb-7.4.50.20120120-48.fc17
I do not know why Fedora PPC has latest build gdb-7.4.50.20120120-42.fc17 when Fedora x86* already had gdb-7.4.50.20120120-47.fc17. If there is an issue with new PPC build you should probably contact Karsten Hopp <karsten> as he is initiator of all the recent PPC Fedora GDB builds: http://ppc.koji.fedoraproject.org/koji/packageinfo?packageID=1888
Package gdb-7.4.50.20120120-48.fc17: * should fix your issue, * was pushed to the Fedora 17 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing gdb-7.4.50.20120120-48.fc17' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-8816/gdb-7.4.50.20120120-48.fc17 then log in and leave karma (feedback).
------- Comment From emachado.com 2012-06-04 13:18 EDT------- (In reply to comment #10) > Package gdb-7.4.50.20120120-48.fc17: > * should fix your issue, > * was pushed to the Fedora 17 testing repository, > * should be available at your local mirror within two days. > Update it with: > # su -c 'yum update --enablerepo=updates-testing gdb-7.4.50.20120120-48.fc17' > as soon as you are able to. Thanks for your support, but it looks like gdb-7.4.50.20120120-48.fc17 is not available yet for ppc: $ su -c 'yum update --enablerepo=updates-testing gdb-7.4.50.20120120-48.fc17' Password: Loaded plugins: auto-update-debuginfo, presto No Match for argument: gdb-7.4.50.20120120-48.fc17 No package gdb-7.4.50.20120120-48.fc17 available. No Packages marked for Update
------- Comment From emachado.com 2012-06-06 13:01 EDT------- I had the chance to test this issue with gdb-7.4.50.20120603-2.fc18 (from http://ppc.koji.fedoraproject.org/koji/buildinfo?buildID=86661) and confirm that the patch was included fixing the problems with hw watchpoints. Thanks Red Hat for your support.
(In reply to comment #6) > I had the chance to test this issue with gdb-7.4.50.20120603-2.fc18 (from > http://ppc.koji.fedoraproject.org/koji/buildinfo?buildID=86661) and confirm > that the patch was included fixing the problems with hw watchpoints. But this is .fc18 build, it will never get to Fedora 17. If it is enough then sure no backport was needed. The backport is present in gdb-7.4.50.20120120-48.fc17, just there is no ppc build for it (yet).
------- Comment From emachado.com 2012-06-06 13:59 EDT------- (In reply to comment #13) > But this is .fc18 build, it will never get to Fedora 17. > If it is enough then sure no backport was needed. > The backport is present in gdb-7.4.50.20120120-48.fc17, just there is no ppc > build for it (yet). It'd be good to have it working on Fedora 17. Would it be possible to have this fix backported to the next ppc build for F17?
here's the f17 build: http://ppc.koji.fedoraproject.org/koji/buildinfo?buildID=87031
------- Comment From emachado.com 2012-06-06 19:28 EDT------- (In reply to comment #15) > here's the f17 build: > http://ppc.koji.fedoraproject.org/koji/buildinfo?buildID=87031 Thanks for the build, Karsten. I've verified this new release (48.fc17) and it has the patch included, fixing the hw watchpoint issues. Thus, I'm closing this bugzilla as fixed on F17. Thanks.
gdb-7.4.50.20120120-49.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/gdb-7.4.50.20120120-49.fc17
gdb-7.4.50.20120120-49.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.