]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: adjust debug/gosym to deal with instantiated types/funcs/methods
authorDan Scales <danscales@google.com>
Thu, 7 Oct 2021 19:21:01 +0000 (12:21 -0700)
committerDan Scales <danscales@google.com>
Mon, 11 Oct 2021 20:46:14 +0000 (20:46 +0000)
commit70235351263caee1fd9840d1d652bf28778cd51d
treee0d7bd43de08a6eb022d9ab5cec0fd64a190e588
parent65ffee6f9a949023f10e5b6b918a7a218d9836a1
cmd/compile: adjust debug/gosym to deal with instantiated types/funcs/methods

This changes debug/gosym so it can deal with instantiated
types/funcs/methods. I also added tests for instantiated names. My
assumption is that the concatenation of PackageName, ReceiverName, and
BaseName in order should cover the entire symbol name, so either the
ReceiverName or the BaseName should include any bracketed information
(either the instantiation of the receiver of a method or the
instantiation of function).

This can provide a model for how to parse instantiated functions and
method names.

Fixes #48032

Change-Id: I476781de2d6fc096efbb4be85c197d6f1cafac21
Reviewed-on: https://go-review.googlesource.com/c/go/+/354689
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Dan Scales <danscales@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/debug/gosym/symtab.go
src/debug/gosym/symtab_test.go