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
tree: 5d47f0b6f61901b82521fb3608740f574a7d3134
  1. agent/
  2. examples/
  3. server/
  4. tests/
  5. .gitignore
  6. .mailmap
  7. cmake-tcf-lib.txt