From 4b5dfd8246321d2cdca0508f6837a681f7873f43 Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Mon, 18 Jul 2011 11:44:09 +0100 Subject: 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 Signed-off-by: Andrzej Zaborowski --- darwin-user/main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'darwin-user') 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)); -- cgit v1.1