Mercurial > illumos > illumos-gate
changeset 13748:f6cfe4fa2687
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>
author | Josef 'Jeff' Sipek <jeffpc@josefsipek.net> |
---|---|
date | Thu, 03 May 2012 14:22:35 -0500 |
parents | 66edd2f65616 |
children | df4cd82e2b60 |
files | usr/src/cmd/mdb/common/mdb/mdb_main.c |
diffstat | 1 files changed, 6 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/cmd/mdb/common/mdb/mdb_main.c Sun Jul 08 13:53:30 2012 -0500 +++ b/usr/src/cmd/mdb/common/mdb/mdb_main.c Thu May 03 14:22:35 2012 -0500 @@ -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 @@ 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 @@ * 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 @@ 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 @@ 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