summaryrefslogtreecommitdiffstats
path: root/oatdump
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2014-12-17 20:40:11 -0800
committerAndreas Gampe <agampe@google.com>2014-12-17 20:40:11 -0800
commitc24f3990db5845691016b935df3d9382b6762f0f (patch)
treed5e295f60196d305583fa5b58120c9cc189f2127 /oatdump
parent55b752a817a08be46b167e07d7fee3d20a8e6a9c (diff)
downloadandroid_art-c24f3990db5845691016b935df3d9382b6762f0f.tar.gz
android_art-c24f3990db5845691016b935df3d9382b6762f0f.tar.bz2
android_art-c24f3990db5845691016b935df3d9382b6762f0f.zip
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.cc11
1 files changed, 9 insertions, 2 deletions
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<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) {