gdb: Override store_sym_names_in_linkage_form_p for Go language

When store_sym_names_in_linkage_form_p was introduced in this commit:

  commit 59cc4834e5
  Date:   Tue Mar 27 08:57:16 2018 -0500

      problem looking up some symbols when they have a linkage name

A special case was left behind for Go, however, this special case was
not really needed anymore, it could be handled by having
store_sym_names_in_linkage_form_p return the true for go, instead of
false.

This commit overrides store_sym_names_in_linkage_form_p for Go, and
then removes the special case.  As store_sym_names_in_linkage_form_p
is only called once throughout GDB this should be perfectly safe.

There should be no user visible changes after this commit.

gdb/ChangeLog:

	* dwarf2/read.c (dwarf2_physname): Remove special case for
	language_go.
	* go-lang.c (go_language::store_sym_names_in_linkage_form_p): New
	member function.
This commit is contained in:
Andrew Burgess 2020-07-08 11:09:45 +01:00
parent d3355e4dec
commit bf92aec588
3 changed files with 11 additions and 6 deletions

View file

@ -638,6 +638,10 @@ public:
&& go_classify_struct_type (type) == GO_TYPE_STRING);
}
/* See language.h. */
bool store_sym_names_in_linkage_form_p () const override
{ return true; }
};
/* Single instance of the Go language class. */