You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've finally had some time to play with Delve and I seem to have some problems with printing variables and goroutines on my setup.
I'm using Go 1.4 RC1 on Ubuntu 14.10.
The program I'm trying to debug looks like this:
package main
import"fmt"funcmain() {
w:="world"fmt.Printf("Hello %s!", w)
}
I've also tried var w string = "world" instead of the short assignment but the result is the same unfortunately.
florin@BLMOT-WIN-04 [12:26:23] [~/golang/src/github.com/dlsniper/untitled8]
-> % go build main.go && dlv ./main
Type 'help'for list of commands.
dlv>break main.go:6
Breakpoint set at 0x400c22 for main.main /home/florin/golang/src/github.com/dlsniper/untitled8/main.go:6
dlv> c
new thread spawned 7326
Stopped at: /home/florin/golang/src/github.com/dlsniper/untitled8/main.go:6
1: package main
2:
3: import "fmt"
4:
5: func main() {
6: => w := "world"
7: fmt.Printf("Hello %s!", w)
8: }
dlv> n
Stopped at: /home/florin/golang/src/github.com/dlsniper/untitled8/main.go:7
2:
3: import "fmt"
4:
5: func main() {
6: w := "world"
7: => fmt.Printf("Hello %s!", w)
8: }
dlv> p w
Command failed: decoding dwarf section info at offset 0x29125: unexpected opcode
dlv> goroutines
Command failed: invalid instruction 0x23
dlv> threads
Thread 7326 at 0x42eccb /usr/local/go/src/runtime/proc.c:2861 sysmon
Thread 7296 at 0x400c30 /home/florin/golang/src/github.com/dlsniper/untitled8/main.go:7 main.main
dlv> p
Command failed: not enough arguments
dlv>exit
readline: 0
Would you like to kill the process? [y/n]
y
Detaching from process...
Killing process 7296
[Hope I was of service hunting your bug!]
Delve seems to be running ok when there's nothing set as a breakpoint
florin@BLMOT-WIN-04 [12:28:14] [~/golang/src/github.com/dlsniper/untitled8]
-> % go build main.go && dlv ./main
Type 'help'for list of commands.
dlv> c
new thread spawned 7688
Hello world!Command failed: process 7679 has exited
dlv>exit
readline: 0
Would you like to kill the process? [y/n]
y
Detaching from process...
[Could not detach no such process]
As a side question, is there any way to have a -debug flag that would allow Delve to print out what's up with the info it tries to understand? I guess it would be helpful to give you what was in memory for this one: Command failed: decoding dwarf section info at offset 0x29125: unexpected opcode. Unfortunately due to severe lack of time I can't add this myself at the moment.
Please let me know if you need any further details to help out with identifying this.
The text was updated successfully, but these errors were encountered:
Yeah, I have a seperate branch going currently with some updates for Go 1.4. The issue is that for Go 1.3 there was a bug in the debug/dwarf package, so I had to vendor it. I submitted a patch, and that patch is included in the Go 1.4 release, as well as some other updates. Essentially, after Go 1.4 Delve will again be able to rely on the standard library debug/dwarf package for some of the dwarf information.
I'm hoping to update and merge in the Go 1.4 branch soon, likely this week. I will close this issue once I have cleaned up and merged to Go 1.4 branch.
I've just merged some more support for Go1.4rc1 into master just now, and have updated the Go1.4 branch, which removes all vendored Dwarf code. Going to close this issue.
* implement optout service
* remove todo
* implement optout service
* remove todo
* implement call in sms and mms to generate optOut link
* move script in one file
* fix logic to create db after check length of optout tag
* remove unsub column
* rename file
* add down file for rollback
* fix sql file
Hi there,
I've finally had some time to play with Delve and I seem to have some problems with printing variables and goroutines on my setup.
I'm using Go 1.4 RC1 on Ubuntu 14.10.
The program I'm trying to debug looks like this:
I've also tried
var w string = "world"
instead of the short assignment but the result is the same unfortunately.Delve seems to be running ok when there's nothing set as a breakpoint
As a side question, is there any way to have a
-debug
flag that would allow Delve to print out what's up with the info it tries to understand? I guess it would be helpful to give you what was in memory for this one:Command failed: decoding dwarf section info at offset 0x29125: unexpected opcode
. Unfortunately due to severe lack of time I can't add this myself at the moment.Please let me know if you need any further details to help out with identifying this.
The text was updated successfully, but these errors were encountered: