Skip to content

support stepping into the standard libarary #12

Open
@jeremyschlatter

Description

@jeremyschlatter

godebug's current procedure for running instrumented code for a package x is:

  • make a temp directory
  • make a subdirectory $TMP/src/x containing instrumented versions of the source files for x
  • run the go command, setting GOPATH=$TMP:$GOPATH. The go command finds our instrumented packages in $TMP/src and finds any other un-instrumented packages in the normal GOPATH.

That process does not work for standard library packages, though, because $GOROOT has to be a single directory.

Here's my current plan for working around this:

  • Implement the proposal from UX improvement: godebug <run, test, build> #8 of having a permanent godebug directory that contains instrumented versions of all the packages we have seen so far. Put standard library packages in the same place, or possibly in their own /goroot or /std directory.
  • From the same proposal, generate a temporary directory for every invocation of godebug and fill it with symlinks to the packages we want to instrument. The only new thing is that for all standard library packages we don't want to instrument, we will need to add a symlink to the real package in $GOROOT.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions