Skip to content

How to step over multi-line statements e.g. struct literals #1482

Answered by hyangah
DazWilkin asked this question in Help
Discussion options

You must be logged in to vote

That is related to how go is generating the debug info.

(dlv)  n
> main.main() ./main.go:13 (PC: 0x10cf721)
     8:         Name string
     9:         Age  int
    10: }
    11:
    12: func main() {
=>  13:         d := &Dog{
    14:                 Name: "Freddie",
    15:                 Age:  2,
    16:         }
    17:         log.Printf("%+v", d)
    18: }
(dlv) disassemble -l main.go:13
TEXT main.main(SB) /Users/hakim/projects/delve/main.go
        main.go:12      0x10cf700       65488b0c2530000000      mov rcx, qword ptr gs:[0x30]
        main.go:12      0x10cf709       483b6110                cmp rsp, qword ptr [rcx+0x10]
        main.go:12      0x10cf70d       0f86f8000000    …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@DazWilkin
Comment options

@hyangah
Comment options

Answer selected by DazWilkin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants