Bug 981356
Summary: | golang "safe path" needs to be added to gdb | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Richard W.M. Jones <rjones> |
Component: | golang | Assignee: | Adam Goode <adam> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 20 | CC: | adam, golang-updates, jan.kratochvil, lemenkov, renich |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | golang-1.2.2-9.fc20 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2014-07-26 15:59:25 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: | |
Embargoed: |
Description
Richard W.M. Jones
2013-07-04 14:24:06 UTC
Step 2 & 3 are of course: 2. go build -o the-program the-program.go 3. gdb ./the-program $ strings /usr/bin/gdb | grep mono $debugdir:$datadir/auto-load:/usr/bin/mono-gdb.py This is hard-coded into gdb for mono. :) But I think I can fix this no problem. To fix this without hacks, #981520 must be addressed. I will put in the files in /etc/gdbinit.d so that if the gdb bug is fixed, this will work. For now, I guess you need to put the recommended commands into .gdbinit. That "/usr/bin/mono-gdb.py" is just a workaround of Mono Bug 815501. The file "/usr/share/golang/src/pkg/runtime/runtime-gdb.py" has incorrect location, it should be placed under "/usr/share/gdb/auto-load/". As the compiled Go program does not use any shared libraries it could be even: /usr/share/gdb/auto-load/usr/share/golang/src/pkg/runtime/runtime-gdb.py It should be just some stub like: /usr/share/gdb/auto-load/usr/lib64/libglib-2.0.so.0.3400.2-gdb.py Jan: I have tried putting runtime-gdb.py in both /usr/share/gdb/auto-load/ as well as /usr/share/gdb/auto-load/usr/lib64/golang/src/pkg/runtime, but it fails. I think this is because of the .debug_gdb_script section in each go file, correct? The correct solution would be to fix the compiler to put the correct path in the executable, right? (In reply to Adam Goode from comment #5) > I think this is because of the .debug_gdb_script section in each go file, > correct? The correct solution would be to fix the compiler to put the > correct path in the executable, right? Yes, I assumed you are going to change also the path in the compiler accordingly. This is a bit unusual case for gdb auto-load because IIUC do golang-produced binaries are statically linked (this also does not seem too much packaging guidelines compliant but if there is no other choice...). BTW I do not know anything about Go but isn't gccgo more suitable for Fedora? gccgo is already in Fedora. golang is the other implementation of Go, based on the Plan 9 toolchain. golang also contains the "go" command, which handles building, dependencies, downloading of remote packages. Eventually this command will be able to drive gccgo as well as the "g" series of compilers. Looks like I need to replace finddebugruntimepath in dwarf.c with a new path. This bug appears to have been reported against 'rawhide' during the Fedora 20 development cycle. Changing version to '20'. More information and reason for this action is here: https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora20 *** Bug 1002415 has been marked as a duplicate of this bug. *** golang-1.2.2-9.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/golang-1.2.2-9.el6 golang-1.2.2-9.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/golang-1.2.2-9.fc19 golang-1.2.2-9.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/golang-1.2.2-9.fc20 Package golang-1.2.2-9.el6: * should fix your issue, * was pushed to the Fedora EPEL 6 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=epel-testing golang-1.2.2-9.el6' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-EPEL-2014-1907/golang-1.2.2-9.el6 then log in and leave karma (feedback). golang-1.2.2-9.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report. golang-1.2.2-9.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report. golang-1.2.2-12.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/golang-1.2.2-12.el6 |