summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2019-06-18 13:45:31 +0100
committer Nicolas Geoffray <ngeoffray@google.com> 2019-06-19 08:45:13 +0000
commit1dd670c0fa3ee83125d412b7882a39a98e6503f6 (patch)
treed253bfd5fcd229e4c4148a7a750b9f38b9f2d512
parent4cd5411c1e8332d3fc33869a87e61ed78052679d (diff)
Add errno message in RemapAtEnd error.
Helps debugging. Test: m Change-Id: I3d8f213e73aebdbe4cbd607bc3d9e9f07fb9a724
-rw-r--r--libartbase/base/mem_map.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/libartbase/base/mem_map.cc b/libartbase/base/mem_map.cc
index 3dbe7b8325..7a7158d0ad 100644
--- a/libartbase/base/mem_map.cc
+++ b/libartbase/base/mem_map.cc
@@ -745,10 +745,10 @@ MemMap MemMap::RemapAtEnd(uint8_t* new_end,
fd,
offset));
if (actual == MAP_FAILED) {
- PrintFileToLog("/proc/self/maps", LogSeverity::WARNING);
- *error_msg = StringPrintf("map(%p, %zd, 0x%x, 0x%x, %d, 0) failed. See process "
+ *error_msg = StringPrintf("map(%p, %zd, 0x%x, 0x%x, %d, 0) failed: %s. See process "
"maps in the log.", tail_base_begin, tail_base_size, tail_prot, flags,
- fd);
+ fd, strerror(errno));
+ PrintFileToLog("/proc/self/maps", LogSeverity::WARNING);
return Invalid();
}
// Update *this.