gdb: make more use of make_target_connection_string
authorAndrew Burgess <aburgess@redhat.com>
Wed, 14 Dec 2022 14:17:44 +0000 (14:17 +0000)
committerAndrew Burgess <aburgess@redhat.com>
Thu, 15 Dec 2022 12:12:08 +0000 (12:12 +0000)
commit53cf95c3389a3ecd97276d322e4a60fe3396a201
tree3cb108e13d3035ddfcecc985b1d37eed263bc286
parentc91a13e4e6790324e2177fa4b98e4637e3b03f97
gdb: make more use of make_target_connection_string

I noticed that we have a function make_target_connection_string which
wraps all the logic for creating a string that describes a target
connection - but in some places we are not calling this function,
instead we duplicate the function's logic.

This commit cleans this up, and calls make_target_connection_string
where possible.

There should be no user visible changes after this commit.
gdb/inferior.c
gdb/target-connection.c