main: fix handling of -g option if feature is disabled
Without this patch building the agent with:
make CFLAGS=-DENABLE_GdbRemoteSerialProtocol=0
And running it with:
./agent -g2000
would silently swollow the option and continue with the default
behaviour, leaving the user with the impression of a running
gdb-rsp server - which is not the case. In addition the option
-g should not show up in the usage string.
This patch fixes both, remove the option from the usage and bail out
with an error if -g is specified but ENABLE_GdbRemoteSerial is zero.
Change-Id: I9a1f0396e7e8c2c2844cc89bdde8ff03cbbf337d
Signed-off-by: Sanimir Agovic <sanimir@subpath.org>
1 file changed