gdb: make set/show inferior-tty work with $_gdb_setting_str
authorAndrew Burgess <aburgess@redhat.com>
Tue, 4 Apr 2023 11:11:50 +0000 (12:11 +0100)
committerAndrew Burgess <aburgess@redhat.com>
Fri, 28 Apr 2023 21:50:46 +0000 (22:50 +0100)
commit598e87ecc064cd8ffc2af4bcde4186d30382f4d5
tree960c83a38af1b0921616e8df0f0e709c9dc9977c
parent94e6c5641234c4ced9cb3fa0ccc2aaaa6b7b62ea
gdb: make set/show inferior-tty work with $_gdb_setting_str

Like the previous two commits, this commit fixes set/show inferior-tty
to work with $_gdb_setting_str.

Instead of using a scratch variable which is then pushed into the
current inferior from a set callback, move to the API that allows for
getters and setters, and store the value directly within the current
inferior.

Update an existing test to check the inferior-tty setting.

Reviewed-By: Tom Tromey <tom@tromey.com>
gdb/infcmd.c
gdb/testsuite/gdb.base/inferior-clone.exp
gdb/testsuite/gdb.multi/gdb-settings.exp