]> Cypherpunks repositories - gostls13.git/commit
[dev.link] debug/gosym: fix file mappings
authorJeremy Faller <jeremy@golang.org>
Wed, 12 Aug 2020 20:37:42 +0000 (16:37 -0400)
committerJeremy Faller <jeremy@golang.org>
Thu, 13 Aug 2020 16:47:01 +0000 (16:47 +0000)
commit954db9fe51154e5d4663c0c1a62c82a99eef1ed4
tree3f154be652bb4a5dead99b70dd465776d73bcccc
parentb249703e3c53cd7f1e5f808fb2f03714fec44b43
[dev.link] debug/gosym: fix file mappings

CL 246497 introduced bugs in gosym that the long tests caught. These two
bugs were:

1) In 1.16, 0 is now a valid file number from pcfile tables.
2) Also, in 1.16, when we scan all functions looking for a pc/file pair,
   the values returned from pcfile are no longer the direct offset into
   the file table. Rather, the values from pcfile are the offset into
   the cu->file look-up table.

This CL fixes those two issues.

Change-Id: I0cd280bdcaeda89faaf9fac41809abdb87734499
Reviewed-on: https://go-review.googlesource.com/c/go/+/248317
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
src/debug/gosym/pclntab.go