aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-lazy-string.c
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2025-07-12 13:29:19 +0100
committerAndrew Burgess <aburgess@redhat.com>2025-08-01 10:15:31 +0100
commit190e5f3ca7dee0b5271483f412defac0c1566835 (patch)
tree4b1c26611d6ba505813a9f110b02a570860b8c40 /gdb/python/py-lazy-string.c
parent7a45c8e03020e8fbe5284e5ffa6d4c710c6fd876 (diff)
downloadbinutils-190e5f3ca7dee0b5271483f412defac0c1566835.zip
binutils-190e5f3ca7dee0b5271483f412defac0c1566835.tar.gz
binutils-190e5f3ca7dee0b5271483f412defac0c1566835.tar.bz2
gdbserver: exit with code 1 after missing packet name
When using the command: $ gdbserver --disable-packet gdbserver lists all the packets that can be disabled, and then exits. I think that this output is a helpful error message that is printed when the user has forgotten to entry a packet name. We get similar output if we run the command: $ gdbserver --disable-packet=foo where gdbserver tells us that 'foo' is invalid, and then lists the packets that we can use. The difference is that, in the first case, gdbserver exits with a code of 0, and in the second, gdbserver exits with a code of 1. I think both these cases should exit with a code of 1. With the exception of '--help' and '--version', where we are asking gdbserver to print some message then exit (which are, and should exit with a code of 0), in all other cases where we do an early exit, I think this is an indication that the user has done something wrong (entered and invalid argument, or missed an argument value), and gdbserver should exit with a non-zero exit code to indicate this. This commit updates the exit code in the above case from 0 to 1. Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/python/py-lazy-string.c')
0 files changed, 0 insertions, 0 deletions