debug/pe: check for zdebug_gdb_scripts section in testDWARF

The debug_gdb_scripts sectino may or may not be compressed. Check
for both.

For #76022.

Change-Id: I7541e0aa2b90f6b3b694e02d3dfa99f9019a9e5a
Reviewed-on: https://go-review.googlesource.com/c/go/+/714461
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Cherry Mui 2025-10-24 16:27:15 -04:00
parent a26f860fa4
commit f5403f15f0

View file

@ -413,7 +413,7 @@ func testDWARF(t *testing.T, linktype int) {
var foundDebugGDBScriptsSection bool
for _, sect := range f.Sections {
if sect.Name == ".debug_gdb_scripts" {
if sect.Name == ".debug_gdb_scripts" || sect.Name == ".zdebug_gdb_scripts" {
foundDebugGDBScriptsSection = true
}
}