diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2011-07-18 11:44:09 +0100 |
---|---|---|
committer | Andrzej Zaborowski <andrew.zaborowski@intel.com> | 2011-07-30 07:20:18 +0200 |
commit | 4b5dfd8246321d2cdca0508f6837a681f7873f43 (patch) | |
tree | 694a9d4cd141b66856f2d15353cdf0a5532a6b89 /darwin-user | |
parent | 8534b8ba337e55031592144ea524f7bcaf144113 (diff) | |
download | qemu-4b5dfd8246321d2cdca0508f6837a681f7873f43.zip qemu-4b5dfd8246321d2cdca0508f6837a681f7873f43.tar.gz qemu-4b5dfd8246321d2cdca0508f6837a681f7873f43.tar.bz2 |
user: Restore debug usage message for '-d ?' in user mode emulation
The code which prints the debug usage message on '-d ?' for *-user
has to come before the check for "not enough arguments", so that
"qemu-foo -d ?" prints the list of possible debug log items rather than
the generic usage message. (This was inadvertently broken in commit
c235d73.)
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
Diffstat (limited to 'darwin-user')
-rw-r--r-- | darwin-user/main.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/darwin-user/main.c b/darwin-user/main.c index 35196a1..72307ad 100644 --- a/darwin-user/main.c +++ b/darwin-user/main.c @@ -809,9 +809,6 @@ int main(int argc, char **argv) usage(); } } - if (optind >= argc) - usage(); - filename = argv[optind]; /* init debug */ cpu_set_log_filename(log_file); @@ -830,6 +827,11 @@ int main(int argc, char **argv) cpu_set_log(mask); } + if (optind >= argc) { + usage(); + } + filename = argv[optind]; + /* Zero out regs */ memset(regs, 0, sizeof(struct target_pt_regs)); |