https://bugzilla.redhat.com/show_bug.cgi?id=1192721
Bug ID: 1192721 Summary: Fix debugging - fix runtime-gdb.py Product: Fedora Version: rawhide Component: golang Assignee: vbatts@redhat.com Reporter: jan.kratochvil@redhat.com QA Contact: extras-qa@fedoraproject.org CC: admiller@redhat.com, golang@lists.fedoraproject.org, lemenkov@gmail.com, lsm5@redhat.com, renich@woralelandia.com, s@shk.io, vbatts@redhat.com
Created attachment 991759 --> https://bugzilla.redhat.com/attachment.cgi?id=991759&action=edit Fedora packaging + runtime-gdb.py fix
Description of problem: Currently golang GDB support script is not loaded at all. Load it and fix its obsolete parts.
Version-Release number of selected component (if applicable): golang-1.4.1-1.fc22.x86_64
How reproducible: Always.
Steps to Reproduce: $ gdb golang-produced binary (gdb) start (gdb) info goroutines (gdb) goroutine 4 bt
Actual results: Undefined info command: "goroutines". Try "help info".
Expected results: Loading Go Runtime support. (gdb) start [...] (gdb) info goroutines * 1 running fname=runtime.switchtoM faddr=0x437a60 &g=0xc208000120 2 runnable fname=runtime.forcegchelper faddr=0x412010 &g=0xc208000480 3 runnable fname=runtime.bgsweep faddr=0x40dcd0 &g=0xc2080005a0 4 runnable fname=runtime.runfinq faddr=0x40d3f0 &g=0xc2080006c0 (gdb) goroutine 4 bt #0 runtime.runfinq () at /usr/lib/golang/src/runtime/malloc.go:712 #1 0x0000000000439ca1 in runtime.goexit () at /usr/lib/golang/src/runtime/asm_amd64.s:2232 #2 0x0000000000000000 in ?? ()
Additional info: Probably some interfaces pretty printer there also needs to be fixed. Backtraces need to be fixed etc. https://sourceware.org/gdb/wiki/GoDebugging
https://bugzilla.redhat.com/show_bug.cgi?id=1192721
Jan Kratochvil jan.kratochvil@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jan.kratochvil@redhat.com
--- Comment #1 from Jan Kratochvil jan.kratochvil@redhat.com --- After rebuild of golang using for tests:
rpm -e --nodeps golang golang-src golang-pkg-bin-linux-amd64;rpm -i golang-1.4.1-1.fc22.x86_64.rpm golang-src-1.4.1-1.fc22.noarch.rpm golang-pkg-bin-linux-amd64-1.4.1-1.fc22.x86_64.rpm;alternatives --set go /usr/lib/golang/bin/linux_amd64/go
https://bugzilla.redhat.com/show_bug.cgi?id=1192721
Jan Kratochvil jan.kratochvil@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #991759|0 |1 is obsolete| |
--- Comment #2 from Jan Kratochvil jan.kratochvil@redhat.com --- Created attachment 991771 --> https://bugzilla.redhat.com/attachment.cgi?id=991771&action=edit Fedora packaging + runtime-gdb.py fix #2
https://bugzilla.redhat.com/show_bug.cgi?id=1192721
--- Comment #3 from Jan Kratochvil jan.kratochvil@redhat.com --- Created attachment 994184 --> https://bugzilla.redhat.com/attachment.cgi?id=994184&action=edit /etc/gdbinit.d/golang.gdb fix
The Comment 2 patch is still valid for golang-1.4.x but otherwise upstream (1.5) has already implemented almost all of the fixes in last month.
The remaining tiny ones I have posted as: https://go-review.googlesource.com/#/c/5522/ https://go-review.googlesource.com/#/c/5521/
This attachment still needs to be applied even for future golang-1.5 as it is Fedora GDB specific packaging: /etc/gdbinit.d/golang.gdb
https://bugzilla.redhat.com/show_bug.cgi?id=1192721
Vincent Batts vbatts@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |CLOSED Resolution|--- |RAWHIDE Last Closed| |2015-08-27 15:09:06
--- Comment #5 from Vincent Batts vbatts@redhat.com --- your upstream commits and the gdb path fix are included in http://koji.fedoraproject.org/koji/taskinfo?taskID=10858659
Thanks!
golang@lists.fedoraproject.org