From e5fed03772144595c0904faf3d6974cc55214c8c Mon Sep 17 00:00:00 2001 From: Richard Uhler Date: Wed, 18 Mar 2015 08:21:11 -0700 Subject: Support relative encoded dex locations in oat files. Now when opening an oat file, the caller can pass an absolute dex location used to resolve the absolute path for any relative encoded dex locations in the oat file. Bug: 19550105 Change-Id: I6e9559afe4d86ac12cf0b90176b5ea696a83d0e7 --- oatdump/oatdump.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'oatdump') diff --git a/oatdump/oatdump.cc b/oatdump/oatdump.cc index 9512376..2268532 100644 --- a/oatdump/oatdump.cc +++ b/oatdump/oatdump.cc @@ -1500,7 +1500,9 @@ class ImageDumper { std::string error_msg; const OatFile* oat_file = class_linker->FindOpenedOatFileFromOatLocation(oat_location); if (oat_file == nullptr) { - oat_file = OatFile::Open(oat_location, oat_location, nullptr, nullptr, false, &error_msg); + oat_file = OatFile::Open(oat_location, oat_location, + nullptr, nullptr, false, nullptr, + &error_msg); if (oat_file == nullptr) { os << "NOT FOUND: " << error_msg << "\n"; return false; @@ -2240,7 +2242,7 @@ static int DumpOat(Runtime* runtime, const char* oat_filename, OatDumperOptions* std::ostream* os) { std::string error_msg; OatFile* oat_file = OatFile::Open(oat_filename, oat_filename, nullptr, nullptr, false, - &error_msg); + nullptr, &error_msg); if (oat_file == nullptr) { fprintf(stderr, "Failed to open oat file from '%s': %s\n", oat_filename, error_msg.c_str()); return EXIT_FAILURE; @@ -2256,7 +2258,7 @@ static int DumpOat(Runtime* runtime, const char* oat_filename, OatDumperOptions* static int SymbolizeOat(const char* oat_filename, std::string& output_name) { std::string error_msg; OatFile* oat_file = OatFile::Open(oat_filename, oat_filename, nullptr, nullptr, false, - &error_msg); + nullptr, &error_msg); if (oat_file == nullptr) { fprintf(stderr, "Failed to open oat file from '%s': %s\n", oat_filename, error_msg.c_str()); return EXIT_FAILURE; -- cgit v1.1