/usr/share/go/src/pkg/runtime is not on gdb's auto-load safe-path
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
golang-1.6 (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Config
======
# series
$ lsb_release -rd
Description: Ubuntu 12.10
Release: 12.10
# pkg
$ apt-cache policy golang-src
golang-src:
Installed: 2:1.0.2-2
Candidate: 2:1.0.2-2
Version table:
*** 2:1.0.2-2 0
500 http://
Problem
=======
Gdb is the canonical debugger for go programs. Package golang-src provides a python file /usr/share/
$ gdb ./hello
GNU gdb (GDB) 7.5-ubuntu
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
For bug reporting instructions, please see:
<http://
Reading symbols from /home/mcarifio/
warning: File "/usr/share/
^^^^^^^
(gdb)
I mitigated this by adding the following gdb directive in /etc/gdb/gdbinit:
add-auto-
Then:
$ gdb ./hello
GNU gdb (GDB) 7.5-ubuntu
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
For bug reporting instructions, please see:
<http://
Reading symbols from /home/mcarifio/
Loading Go Runtime support.
^^^^^^^
(gdb)
I'm not sure how best to solve this in general, but golang-src probably needs to configure gdb to accept
/usr/share/
It took me a little while to figure out how auto-load safe-path works, how gdb initializes on start, where the files are located such as /etc/gdb/gdbinit and ~/.gdbinit. So it takes a little investigation for a programmer to reconstruct what I did above. But its also a fixable annoyance.
tags: | added: gdb golang |
affects: | golang (Ubuntu) → golang-1.6 (Ubuntu) |
Status changed to 'Confirmed' because the bug affects multiple users.