diff options
author | Josef 'Jeff' Sipek <jeffpc@josefsipek.net> | 2012-05-03 14:22:35 -0500 |
---|---|---|
committer | Richard Lowe <richlowe@richlowe.net> | 2012-07-11 21:36:02 -0400 |
commit | ffd958e4d790c7ed8da981f3a610065de342362c (patch) | |
tree | 19eecf3969953e93b69a7fa73ff294a66cf4e9f8 /usr/src | |
parent | 3ab06c272dba4a37b5b352788c61484729197623 (diff) | |
download | illumos-joyent-ffd958e4d790c7ed8da981f3a610065de342362c.tar.gz |
2676 'mdb -f vmdump.0' ignores the -f
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Reviewed by: Gary Mills <gary_mills@fastmail.fm>
Approved by: Richard Lowe <richlowe@richlowe.net>
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/cmd/mdb/common/mdb/mdb_main.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/usr/src/cmd/mdb/common/mdb/mdb_main.c b/usr/src/cmd/mdb/common/mdb/mdb_main.c index 8399bde41c..caccef986d 100644 --- a/usr/src/cmd/mdb/common/mdb/mdb_main.c +++ b/usr/src/cmd/mdb/common/mdb/mdb_main.c @@ -21,6 +21,7 @@ /* * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. + * Copyright 2012, Josef 'Jeff' Sipek <jeffpc@31bits.net>. All rights reserved. */ #include <sys/types.h> @@ -803,6 +804,9 @@ main(int argc, char *argv[], char *envp[]) tgt_argc -= c; } + if (fflag) + goto tcreate; /* skip re-exec and just create target */ + /* * If we just have an object file name, and that file doesn't * exist, and it's a string of digits, infer it to be a @@ -866,8 +870,7 @@ main(int argc, char *argv[], char *envp[]) * it is not and the target is unknown, use the rawfile tgt. * Otherwise an ELF-based target is needed, so we must abort. */ - if (tgt_ctor != mdb_rawfile_tgt_create && - mdb_gelf_check(io, &ehdr, ET_NONE) == -1) { + if (mdb_gelf_check(io, &ehdr, ET_NONE) == -1) { if (tgt_ctor != NULL) { (void) mdb_gelf_check(io, &ehdr, ET_EXEC); mdb_io_destroy(io); @@ -878,8 +881,7 @@ main(int argc, char *argv[], char *envp[]) mdb_io_destroy(io); - if (identify_xvm_file(tgt_argv[0], &longmode) == 1 && - !fflag) { + if (identify_xvm_file(tgt_argv[0], &longmode) == 1) { #ifdef _LP64 if (!longmode) goto reexec; @@ -891,9 +893,6 @@ main(int argc, char *argv[], char *envp[]) goto tcreate; } - if (tgt_ctor == mdb_rawfile_tgt_create) - goto tcreate; /* skip re-exec and just create target */ - /* * The object file turned out to be a user core file (ET_CORE), * and no other arguments were specified, swap 0 and 1. The |