I get a "Invalid cast. " error when debuging

1,461 views
Skip to first unread message

18126...@163.com

unread,
Jul 15, 2016, 4:43:50 AM7/15/16
to golang-nuts
I using gdb for debugging,  and set a variable new value , then failed.

look this screen:

(gdb) whatis tokenId
type = struct string
(gdb) set tokenId="ab"
Invalid cast.
(gdb) 


GO in gdb is not supported a memory value change?

Konstantin Khomoutov

unread,
Jul 15, 2016, 12:33:52 PM7/15/16
to 18126...@163.com, golang-nuts
Support for Go in gdb is beleived to be suboptimal (and AFAIK the
situation in unlikely to change). Consider trying devle -- which is a
native debugger for Go.

Nigel Tao

unread,
Jul 15, 2016, 6:41:03 PM7/15/16
to Konstantin Khomoutov, 18126...@163.com, golang-nuts
On Sat, Jul 16, 2016 at 2:33 AM, Konstantin Khomoutov
<flat...@users.sourceforge.net> wrote:
> Support for Go in gdb is beleived to be suboptimal (and AFAIK the
> situation in unlikely to change). Consider trying devle -- which is a
> native debugger for Go.

Just a small typo: devle should be delve, which is at
https://github.com/derekparker/delve

moblop...@gmail.com

unread,
Dec 10, 2019, 12:44:40 PM12/10/19
to golang-nuts
Debug
Reply all
Reply to author
Forward
0 new messages