]> Cypherpunks repositories - gostls13.git/commit
cmd/link/internal/ld: add dwarf testing helpers
authorMichael Pratt <mpratt@google.com>
Thu, 15 Dec 2022 22:17:01 +0000 (17:17 -0500)
committerGopher Robot <gobot@golang.org>
Mon, 30 Jan 2023 16:32:56 +0000 (16:32 +0000)
commit87860873efdcc3fde7327eb4c3a9d3e6ea33d245
tree73331ae648fc2d04995139d2ee894273d4e10cf5
parentd42c08a2be456d353a7aca3110edeb9bdb66ebd0
cmd/link/internal/ld: add dwarf testing helpers

Many tests build a program just to analyze it with dwtest.Examiner. Add
gobuildAndExamine, a helper that returns Examiner directly to reduce
duplication in these tests.

Many tests also lookup the DIE for a specific subprogram, which includes
several verification steps. Package those up in findSubprogramDIE.

Change-Id: I72202ba289ae8389b682be525ff7e6cfbfc00ff3
Reviewed-on: https://go-review.googlesource.com/c/go/+/458196
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/link/internal/ld/dwarf_test.go