]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb/gdbserver: move argument setting complexity into gdbsupport/
authorAndrew Burgess <aburgess@redhat.com>
Sun, 19 Nov 2023 15:24:59 +0000 (15:24 +0000)
committerAndrew Burgess <aburgess@redhat.com>
Fri, 13 Feb 2026 16:37:38 +0000 (16:37 +0000)
commit7de2cbde437a37aae1b8eb8da7718e5179187dda
treef26828137310ade8a1f29245256d1f571cdad66b
parent51b7445c65ff06a6d9740fc635be73287527a0a5
gdb/gdbserver: move argument setting complexity into gdbsupport/

This commit removes some uses of gdb::argv_vec from GDB.

The gdb::argv_vec class exists in part due to our need to convert from
one container type to another in a few places, and I think by using
templates we can push this conversion down into
gdbsupport/common-inferior.{cc,h} and remove the conversion logic from
higher level code in GDB.  This should make core GDB simpler.

For examples of this simplification, see python/py-inferior.c,
remote.c, and unittests/remote-arg-selftests.c, where this commit has
allowed for the removal of some code that only exists in order to
convert the container type.

Ideally I'd like to see all uses of gdb::argv_vec removed, but I'm
still not sure about the use in nat/fork-inferior.c, I think its use
there might be the best solution, so for now at least, I have no plans
to touch that code.

There should be no user visible changes after this commit.

Approved-By: Tom Tromey <tom@tromey.com>
gdb/inferior.c
gdb/inferior.h
gdb/python/py-inferior.c
gdb/remote.c
gdb/unittests/remote-arg-selftests.c
gdbserver/server.cc
gdbsupport/common-inferior.cc
gdbsupport/common-inferior.h
gdbsupport/remote-args.cc
gdbsupport/remote-args.h