diff options
author | Andrew Burgess <aburgess@redhat.com> | 2023-11-09 15:28:49 +0000 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2025-04-24 16:45:51 +0100 |
commit | 709aefc274a2a7bd67a0f1a5ed09cac8974367fc (patch) | |
tree | 1ed9e1b1002f3bc2374be443a3af59ce28fe767c /libctf/ctf-error.c | |
parent | bd036f034b750e101cd072100d54cd8ebb35b7f5 (diff) | |
download | binutils-709aefc274a2a7bd67a0f1a5ed09cac8974367fc.zip binutils-709aefc274a2a7bd67a0f1a5ed09cac8974367fc.tar.gz binutils-709aefc274a2a7bd67a0f1a5ed09cac8974367fc.tar.bz2 |
gdb: add remote argument passing unit tests
This commit adds some remote argument passing unit tests. There are
not many tests right now -- there are known bugs in the remote
argument passing mechanism (see PR gdb/28392) -- but some simple cases
are covered here, and I plan to add additional tests once I've fixed
more of the problems with the existing argument handling code.
The tests take an inferior argument string, this is the string that
GDB would carry around as inferior::m_args. This string is then split
using gdb::remote_args::split, this gives a vector of strings, these
are the strings that are passed over the remote protocol. These split
strings are validated as part of the test.
The split strings are then combined using gdb::remote_args::join which
gives the inferior argument string that gdbserver will use, this is
held in server.cc as program_args, this joined string is then checked
as part of the test.
There are no changes to GDB's behaviour as part of this commit, other
than adding the new tests which can be run with:
(gdb) maintenance selftest remote-args
Running selftest remote-args.
Ran 1 unit tests, 0 failed
Tested-By: Guinevere Larsen <guinevere@redhat.com>
Diffstat (limited to 'libctf/ctf-error.c')
0 files changed, 0 insertions, 0 deletions