OSDN Git Service

ppc sim: Improve invalid option error message
authorbrobecke <brobecke>
Wed, 8 Jun 2011 16:44:28 +0000 (16:44 +0000)
committerbrobecke <brobecke>
Wed, 8 Jun 2011 16:44:28 +0000 (16:44 +0000)
commit7d597ec927050e1a8b9eb567742add120fc8300e
treeb2fd9d63e67125a4d6b3af53e676dbcc16d5e3af
parent0b7f438845ed04f652e9a107b4f3b9409d37cff4
ppc sim: Improve invalid option error message

This patch improves the error message when an invalid option is
detected, by also printing the option that actually caused the error.
For instance, from GDB:

        (gdb) target sim --hello
        Invalid option: --hello
        Usage:
        [...]

We also added the usage after an invalid long-name option (Eg: --hello)
to be in line with what's being done for all other invalid options
being detected.

sim/ppc/ChangeLog:

        * psim.c (psim_options): Add option that cause the error
        in invalid-option error messages. Print the usage when
        detecting an invalid long-name option.
sim/ppc/ChangeLog
sim/ppc/psim.c