aboutsummaryrefslogtreecommitdiff
path: root/src/client/linux/minidump_writer/linux_dumper.h
diff options
context:
space:
mode:
authorrmcilroy@chromium.org <rmcilroy@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2014-07-22 11:34:11 +0000
committerrmcilroy@chromium.org <rmcilroy@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2014-07-22 11:34:11 +0000
commit561f81873562d407ac1c39144b30e26163e0045d (patch)
tree7f2c072ddac47a40a34e46a36784dfcdd4fc411e /src/client/linux/minidump_writer/linux_dumper.h
parentBoth std::tr1::unordered_set and std::unordered_set are not allowed in (diff)
downloadbreakpad-561f81873562d407ac1c39144b30e26163e0045d.tar.xz
Chrome on Android now supports loading the shared library directly from the APK file.
This patch makes two changes to breakpad to enable crash reporting to work correctly when the library is inside another file (an archive): - Do not filter mappings which map an executable at a non-zero offset. - If such an executable is mapped look in the ELF information for the shared object name and use that name in the minidump. Note this change doesn't care about the archive format and isn't Android specific (though loading the shared library this way is currently only done on Android). BUG=390618 R=thestig@chromium.org Review URL: https://breakpad.appspot.com/7684002 Patch from Anton Carver <anton@chromium.org>. git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1355 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/linux/minidump_writer/linux_dumper.h')
-rw-r--r--src/client/linux/minidump_writer/linux_dumper.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/client/linux/minidump_writer/linux_dumper.h b/src/client/linux/minidump_writer/linux_dumper.h
index 335a2ce9..ad2af018 100644
--- a/src/client/linux/minidump_writer/linux_dumper.h
+++ b/src/client/linux/minidump_writer/linux_dumper.h
@@ -107,6 +107,7 @@ struct MappingInfo {
uintptr_t start_addr;
size_t size;
size_t offset; // offset into the backed file.
+ bool exec; // true if the mapping has the execute bit set.
char name[NAME_MAX];
};
@@ -162,6 +163,13 @@ class LinuxDumper {
unsigned int mapping_id,
uint8_t identifier[sizeof(MDGUID)]);
+ // Find the shared object name (SONAME) by examining the ELF information
+ // for |mapping|. If the SONAME is found copy it into the passed buffer
+ // |soname| and return true. The size of the buffer is |soname_size|.
+ // The SONAME will be truncated if it is too long to fit in the buffer.
+ static bool ElfFileSoName(
+ const MappingInfo& mapping, char* soname, size_t soname_size);
+
uintptr_t crash_address() const { return crash_address_; }
void set_crash_address(uintptr_t crash_address) {
crash_address_ = crash_address;