sirnewton01 / godbg

Web-based gdb front-end application
BSD 2-Clause "Simplified" License
228 stars 26 forks source link

runtime error: index out of range #4

Closed volgar1x closed 11 years ago

volgar1x commented 11 years ago

Hello, I'd love to have a graphical Go debugger but till now I could not find a way to use it properly. Actually, I get a runtime error index out of range on my application startup. Here is the logs :

panic: runtime error: index out of range

goroutine 5 [running]:
github.com/sirnewton01/gdblib.func·002()
    /home/blackrush/Workspace/GoProjects/src/github.com/sirnewton01/gdblib/gdblib.go:185 +0xe3a
created by github.com/sirnewton01/gdblib.NewGDB
    /home/blackrush/Workspace/GoProjects/src/github.com/sirnewton01/gdblib/gdblib.go:268 +0x3c0

goroutine 1 [syscall]:
syscall.Syscall6()
    /usr/local/go/src/pkg/syscall/asm_linux_amd64.s:41 +0x5
syscall.wait4(0x542d, 0xc200155680, 0x0, 0xc20010cb40, 0x100000001, ...)
    /usr/local/go/src/pkg/syscall/zerrors_linux_amd64.go:1640 +0x7b
syscall.Wait4(0x542d, 0x7ffad95f1b7c, 0x0, 0xc20010cb40, 0x0, ...)
    /usr/local/go/src/pkg/syscall/syscall_linux.go:222 +0x6c
os.(*Process).wait(0xc200110500, 0x0, 0x0, 0x0)
    /usr/local/go/src/pkg/os/exec_unix.go:22 +0xea
os.(*Process).Wait(0xc200110500, 0x7, 0x0, 0x0)
    /usr/local/go/src/pkg/os/doc.go:43 +0x25
os/exec.(*Cmd).Wait(0xc2000d1640, 0x0, 0x0)
    /usr/local/go/src/pkg/os/exec/exec.go:310 +0x197
github.com/sirnewton01/gdblib.(*GDB).Wait(0xc2000e1b60, 0x0, 0x0)
    /home/blackrush/Workspace/GoProjects/src/github.com/sirnewton01/gdblib/gdblib.go:282 +0x29
main.main()
    /home/blackrush/Workspace/GoProjects/src/github.com/sirnewton01/godbg/godbg.go:261 +0xa9c

goroutine 2 [syscall]:

goroutine 6 [select]:
github.com/sirnewton01/gdblib.func·001()
    /home/blackrush/Workspace/GoProjects/src/github.com/sirnewton01/gdblib/gdblib.go:123 +0x50c
created by github.com/sirnewton01/gdblib.NewGDB
    /home/blackrush/Workspace/GoProjects/src/github.com/sirnewton01/gdblib/gdblib.go:269 +0x3d2

I'm running on Fedora 19 x86_64 with yum installed GDB and Go 1.1.1.

tredoe commented 11 years ago

What gdb version are you using?

gdb --version

volgar1x commented 11 years ago

It gives me :

GNU gdb (GDB) Fedora (7.6-34.fc19)

LukeMauldin commented 11 years ago

I am getting the same error. I am using Windows 7 X64, GDB version 7.6.

Luke

tredoe commented 11 years ago

The author had updated the package and a library related to it. Try update it:

go get -u -v github.com/sirnewton01/godbg

Else, try updating to Go 1.1.2

I have: GNU gdb (GDB) 7.5.91.20130417-cvs-ubuntu go version go1.1.2 linux/amd64

sirnewton01 commented 11 years ago

It could be an empty line coming back from gdb. I hope to have a fix in shortly.

sirnewton01 commented 11 years ago

I have pushed an update to the github.com/sirnewton01/gdblib package that should avoid the index out of range panic.