Get the complete linux gate mapping instead of only one page

A=Mike Hommey <mh@glandium.org>
R=ted at https://breakpad.appspot.com/542002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1134 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
ted.mielczarek@gmail.com 2013-03-29 15:06:24 +00:00
parent cd0eb0f8dc
commit ece9df9386

View file

@ -99,15 +99,14 @@ LinuxDumper::ElfFileIdentifierForMapping(const MappingInfo& mapping,
// Special-case linux-gate because it's not a real file.
if (my_strcmp(mapping.name, kLinuxGateLibraryName) == 0) {
const uintptr_t kPageSize = getpagesize();
void* linux_gate = NULL;
if (pid_ == sys_getpid()) {
linux_gate = reinterpret_cast<void*>(mapping.start_addr);
} else {
linux_gate = allocator_.Alloc(kPageSize);
linux_gate = allocator_.Alloc(mapping.size);
CopyFromProcess(linux_gate, pid_,
reinterpret_cast<const void*>(mapping.start_addr),
kPageSize);
mapping.size);
}
return FileID::ElfFileIdentifierFromMappedFile(linux_gate, identifier);
}