gdb and runtime-gdb.py syntax error

100 views
Skip to first unread message

Lars Pensjö

unread,
Sep 28, 2014, 7:49:25 AM9/28/14
to golan...@googlegroups.com
I add "add-auto-load-safe-path /usr/share/go/src/pkg/runtime/runtime-gdb.py" to .gdbinit, and then start gdb. Now I get:

$ go version
go version go1.2.1 linux/amd64
$ gdb MergePrograms.test 
GNU gdb (Ubuntu 7.7-0ubuntu3.1) 7.7
Copyright (C) 2014 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 "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
Find the GDB manual and other documentation resources online at:
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from MergePrograms.test...done.
  File "/usr/share/go/src/pkg/runtime/runtime-gdb.py", line 358
    print s, ptr['goid'], "%8s" % sts[long((ptr['status']))], blk.function
          ^
SyntaxError: invalid syntax
(gdb) 


What is wrong?

Harmen B

unread,
Sep 28, 2014, 10:02:16 AM9/28/14
to Lars Pensjö, golang-nuts
In python3 `print` has changed from a keyword to a function (so it needs parenthesis). My guess is you have python3 as the `python` command, but it should be python 2.7.

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

graha...@gmail.com

unread,
Sep 29, 2014, 10:11:08 PM9/29/14
to golan...@googlegroups.com
There's an issue tracking there here: https://code.google.com/p/go/issues/detail?id=6698
Reply all
Reply to author
Forward
0 new messages