debug/gosym: skip non-real functions in LineToPC lookup
debug/gosym: skip non-real functions in LineToPC lookup

The code iterates through the func table to find a function with
a given file and line number. The code panics if it sees a non-
real function (e.g. go.buildid), because its CU offset is -1,
which causes an index-out-of-bounds error. The debug/gosym package
recovers the panic and returns "not found", without looping
through the rest of the entries.

Skip the non-real functions. They cannot be looked up by line
number anyway.

Fixes #51890.

Change-Id: I96f64c17b4a53ffdce047c8244b35a402a0d39ac
Reviewed-on: https://go-review.googlesource.com/c/go/+/395074
Trust: Cherry Mui <d62e63aa42ce272d7b6a5055d97e942b33a34679@google.com>
Run-TryBot: Cherry Mui <d62e63aa42ce272d7b6a5055d97e942b33a34679@google.com>
TryBot-Result: Gopher Robot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>
Reviewed-by: Jeremy Faller <b3f594e10a9edcf5413cf1190121d45078c62290@golang.org>

nawawi/go,golang/go,nawawi/go,nawawi/go,CAFxX/go,golang/go,golang/go,nawawi/go,CAFxX/go,CAFxX/go,CAFxX/go,CAFxX/go,CAFxX/go,golang/go,golang/go,CAFxX/go,golang/go,nawawi/go,nawawi/go,nawawi/go,nawawi/go,golang/go,CAFxX/go,golang/go