diff options
author | Richard Uhler <ruhler@google.com> | 2015-03-18 08:21:11 -0700 |
---|---|---|
committer | Richard Uhler <ruhler@google.com> | 2015-03-24 12:48:09 -0700 |
commit | e5fed03772144595c0904faf3d6974cc55214c8c (patch) | |
tree | 27c242e48cabd2543f472930d1ad7e2ab86557fe /oatdump | |
parent | b93581f857e36a62f690e26e78167f2abea0f033 (diff) | |
download | art-e5fed03772144595c0904faf3d6974cc55214c8c.zip art-e5fed03772144595c0904faf3d6974cc55214c8c.tar.gz art-e5fed03772144595c0904faf3d6974cc55214c8c.tar.bz2 |
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
Diffstat (limited to 'oatdump')
-rw-r--r-- | oatdump/oatdump.cc | 8 |
1 files changed, 5 insertions, 3 deletions
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; |