From c24f3990db5845691016b935df3d9382b6762f0f Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Wed, 17 Dec 2014 20:40:11 -0800 Subject: ART: Fix oatdump Refactor and modify cmdline.h to allow oatdump to run without a Runtime. Bug: 18789891 Change-Id: I1d7a1585e3672d04e58dbac9a4d4bd835c1c9143 --- oatdump/oatdump.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'oatdump') diff --git a/oatdump/oatdump.cc b/oatdump/oatdump.cc index b989c7fbf7..de4ea36bbb 100644 --- a/oatdump/oatdump.cc +++ b/oatdump/oatdump.cc @@ -2177,11 +2177,18 @@ struct OatdumpMain : public CmdlineMain { virtual bool ExecuteWithoutRuntime() OVERRIDE { CHECK(args_ != nullptr); - CHECK(args_->symbolize_); + CHECK(args_->oat_filename_ != nullptr); MemMap::Init(); - return SymbolizeOat(args_->oat_filename_, args_->output_name_) == EXIT_SUCCESS; + if (args_->symbolize_) { + return SymbolizeOat(args_->oat_filename_, args_->output_name_) == EXIT_SUCCESS; + } else { + return DumpOat(nullptr, + args_->oat_filename_, + oat_dumper_options_.release(), + args_->os_) == EXIT_SUCCESS; + } } virtual bool ExecuteWithRuntime(Runtime* runtime) { -- cgit v1.2.3