Public bug reported: 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://us.archive.ubuntu.com/ubuntu/ quantal/universe i386 Packages Problem ======= Gdb is the canonical debugger for go programs. Package golang-src provides a python file /usr/share/go/src/pkg/runtime/runtime-gdb.py to assist go programmers with specialized gdb commands (I don't really know just how useful they are). gdb complains when it starts that it can't load /usr/share/go/src/pkg/runtime/runtime-gdb.py because its not on the "auto-load safe-path": $ gdb ./hello GNU gdb (GDB) 7.5-ubuntu Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> 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://www.gnu.org/software/gdb/bugs/>... Reading symbols from /home/mcarifio/tech/golang/workspace/src/hello/hello...done. warning: File "/usr/share/go/src/pkg/runtime/runtime-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load". ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning above (gdb) I mitigated this by adding the following gdb directive in /etc/gdb/gdbinit: add-auto-load-safe-path /usr/share/go/src/pkg/runtime 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://gnu.org/licenses/gpl.html> 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://www.gnu.org/software/gdb/bugs/>... Reading symbols from /home/mcarifio/tech/golang/workspace/src/hello/hello...done. Loading Go Runtime support. ^^^^^^^^^^^^^^^^^^^^^^^^^^ success indicated above (gdb) I'm not sure how best to solve this in general, but golang-src probably needs to configure gdb to accept /usr/share/go/src/pkg/runtime/runtime-gdb.py as safe. 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. ** Affects: golang (Ubuntu) Importance: Undecided Status: New ** Tags: gdb golang ** Tags added: gdb golang -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1076454 Title: /usr/share/go/src/pkg/runtime is not on gdb's auto-load safe-path To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/golang/+bug/1076454/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs