]> Cypherpunks repositories - gostls13.git/commitdiff
debug/pe: check for zdebug_gdb_scripts section in testDWARF
authorCherry Mui <cherryyz@google.com>
Fri, 24 Oct 2025 20:27:15 +0000 (16:27 -0400)
committerCherry Mui <cherryyz@google.com>
Fri, 24 Oct 2025 21:17:50 +0000 (14:17 -0700)
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>
src/debug/pe/file_test.go

index 3d960ab7f36b84a08b4df3568d6f40f8e4920b61..acea0455d88c19d59e4264ea9caa3d02ca70b6d5 100644 (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
                }
        }