summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Shih-wei Liao <sliao@google.com> 2012-06-07 09:25:28 -0700
committer Shih-wei Liao <sliao@google.com> 2012-06-07 09:32:37 -0700
commita060ed959efb8d57419edc3c5c1fa48372cc6588 (patch)
tree5d40e49f8f9f7cbcf2a1a5be1d800b8ab03d8f21
parentb65c9244ff8999fd62aecd86494886c61a50a60c (diff)
Fix error meessages in DexFile::ChangePermissions() and mem_map.cc.
Change-Id: I9be999b61b0fca1ab9cad7521346681d2370f1c4
-rw-r--r--src/dex_file.cc2
-rw-r--r--src/mem_map.cc3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/dex_file.cc b/src/dex_file.cc
index 3ba671e23e..cca1a30f32 100644
--- a/src/dex_file.cc
+++ b/src/dex_file.cc
@@ -96,7 +96,7 @@ const DexFile* DexFile::Open(const std::string& filename,
}
void DexFile::ChangePermissions(int prot) const {
- mem_map_->Protect(prot);
+ CHECK(mem_map_->Protect(prot)) << GetLocation();
}
const DexFile* DexFile::OpenFile(const std::string& filename,
diff --git a/src/mem_map.cc b/src/mem_map.cc
index 8201fa8fbe..d3ebd4a60d 100644
--- a/src/mem_map.cc
+++ b/src/mem_map.cc
@@ -233,7 +233,8 @@ bool MemMap::Protect(int prot) {
return true;
}
- PLOG(ERROR) << "mprotect(" << base_begin_ << ", " << base_size_ << ", " << prot << ") failed";
+ PLOG(ERROR) << "mprotect(" << reinterpret_cast<void*>(base_begin_) << ", " << base_size_ << ", "
+ << prot << ") failed";
return false;
}