sim: ppc: do not exit when parsing args w/gdb

When connecting to the simulator in gdb, we don't want it to exit on
us when we pass down unknown/invalid/help/etc... options.  Plumb down
the kind argument so we can handle both gdb & psim interfaces.
This commit is contained in:
Mike Frysinger
2016-01-02 02:34:05 -05:00
parent 4a2abdc468
commit dea827fc5c
5 changed files with 50 additions and 22 deletions

View File

@@ -270,13 +270,13 @@ main(int argc, char **argv)
device *root = psim_tree();
/* parse the arguments */
argv = psim_options(root, argv + 1);
argv = psim_options (root, argv + 1, SIM_OPEN_STANDALONE);
if (argv[0] == NULL) {
if (ppc_trace[trace_opts]) {
print_options ();
return 0;
} else {
psim_usage(0, 0);
psim_usage (0, 0, SIM_OPEN_STANDALONE);
}
}
name_of_file = argv[0];