Skip to content

cmd/compile: emit a safe point after every instruction  #57719

@superbobry

Description

@superbobry

I am not familiar with Go compiler internals, so it is possible that the wording in the issue title is wrong. However, the request from the user perspective is to have a safe point for every place in the code where Delve can stop. This is not the case right now and occasionally Delve rejects evaluating an expression due to a missing safe point:

(dlv) call f.String()                                                                                                                                                                                               > foo/bar/bar.boo()
boo() foo/bar/boo.go:123 (PC: 0x55bb509b9466)                                                                
Command failed: call not at safe point 

I find it difficult to predict where safe points exists, so I just keep stepping forward and retrying the call command until it succeeds (not always the case). This significantly degrades the debugging experience for me, which is why this issue.

Note that a similar request was filed in go-delve/delve#3175 a few months ago, but it was closed because it requires a change in the Go compiler and not Delve.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.compiler/runtimeIssues related to the Go compiler and/or runtime.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions