diff options
author | Andreas Gampe <agampe@google.com> | 2014-12-17 20:40:11 -0800 |
---|---|---|
committer | Andreas Gampe <agampe@google.com> | 2014-12-17 20:40:11 -0800 |
commit | c24f3990db5845691016b935df3d9382b6762f0f (patch) | |
tree | d5e295f60196d305583fa5b58120c9cc189f2127 /oatdump | |
parent | 55b752a817a08be46b167e07d7fee3d20a8e6a9c (diff) | |
download | art-c24f3990db5845691016b935df3d9382b6762f0f.zip art-c24f3990db5845691016b935df3d9382b6762f0f.tar.gz art-c24f3990db5845691016b935df3d9382b6762f0f.tar.bz2 |
ART: Fix oatdump
Refactor and modify cmdline.h to allow oatdump to run without a
Runtime.
Bug: 18789891
Change-Id: I1d7a1585e3672d04e58dbac9a4d4bd835c1c9143
Diffstat (limited to 'oatdump')
-rw-r--r-- | oatdump/oatdump.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/oatdump/oatdump.cc b/oatdump/oatdump.cc index b989c7f..de4ea36 100644 --- a/oatdump/oatdump.cc +++ b/oatdump/oatdump.cc @@ -2177,11 +2177,18 @@ struct OatdumpMain : public CmdlineMain<OatdumpArgs> { 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) { |