From 850162c870d99037c0287d4335e90326a4fc2df3 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Thu, 12 Jan 2012 18:46:43 -0800 Subject: Include the name of the source when extracting classes.dex in memory. This should make it easier to understand crashes from the log. Change-Id: Ic1d1214da3b8340aa685431439c16cfac9746029 --- src/dex_file.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/dex_file.cc b/src/dex_file.cc index e59926829c..31a7d1007c 100644 --- a/src/dex_file.cc +++ b/src/dex_file.cc @@ -144,10 +144,9 @@ const DexFile* DexFile::Open(const ZipArchive& zip_archive, const std::string& l } uint32_t length = zip_entry->GetUncompressedLength(); - UniquePtr map(MemMap::MapAnonymous("classes.dex extracted in memory", - NULL, - length, - PROT_READ | PROT_WRITE)); + std::string name("classes.dex extracted in memory from "); + name += location; + UniquePtr map(MemMap::MapAnonymous(name.c_str(), NULL, length, PROT_READ | PROT_WRITE)); if (map.get() == NULL) { LOG(ERROR) << "mmap classes.dex for \"" << location << "\" failed"; return NULL; -- cgit v1.2.3-59-g8ed1b