summaryrefslogtreecommitdiffstats
path: root/oatdump/oatdump.cc
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2014-06-26 16:11:07 -0700
committerAndreas Gampe <agampe@google.com>2014-07-08 12:14:38 -0700
commitc87d27b25994da8670d82a8f7bad6327b693bfff (patch)
treee8ad0fa224f050c5c3e3e30ccdc0912f28650f42 /oatdump/oatdump.cc
parente8a30f37bf1530a80a7df17692dbe7a68764ac30 (diff)
downloadart-c87d27b25994da8670d82a8f7bad6327b693bfff.tar.gz
art-c87d27b25994da8670d82a8f7bad6327b693bfff.tar.bz2
art-c87d27b25994da8670d82a8f7bad6327b693bfff.zip
ART: Key-Value Store in Oat header
Allows the storage of string-string pairs in the oat header. The first significant use of this is storing the implicit-check flags, so that an oat file can be rejected if it doesn't agree with the current runtime. Bump the oat version as the header structure changes. Change-Id: I15a1c16886e6b8fa7b881c918c19c1efa5c7c00f
Diffstat (limited to 'oatdump/oatdump.cc')
-rw-r--r--oatdump/oatdump.cc16
1 files changed, 12 insertions, 4 deletions
diff --git a/oatdump/oatdump.cc b/oatdump/oatdump.cc
index 12970fcaab..631d53825f 100644
--- a/oatdump/oatdump.cc
+++ b/oatdump/oatdump.cc
@@ -171,10 +171,18 @@ class OatDumper {
os << "IMAGE FILE LOCATION OAT BEGIN:\n";
os << StringPrintf("0x%08x\n\n", oat_header.GetImageFileLocationOatDataBegin());
- os << "IMAGE FILE LOCATION:\n";
- const std::string image_file_location(oat_header.GetImageFileLocation());
- os << image_file_location;
- os << "\n\n";
+ // Print the key-value store.
+ {
+ os << "KEY VALUE STORE:\n";
+ size_t index = 0;
+ const char* key;
+ const char* value;
+ while (oat_header.GetStoreKeyValuePairByIndex(index, &key, &value)) {
+ os << key << " = " << value << "\n";
+ index++;
+ }
+ os << "\n";
+ }
os << "BEGIN:\n";
os << reinterpret_cast<const void*>(oat_file_.Begin()) << "\n\n";