diff options
Diffstat (limited to 'src/client/linux/minidump_writer/linux_dumper.h')
-rw-r--r-- | src/client/linux/minidump_writer/linux_dumper.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/client/linux/minidump_writer/linux_dumper.h b/src/client/linux/minidump_writer/linux_dumper.h index c3c79926..0e20209b 100644 --- a/src/client/linux/minidump_writer/linux_dumper.h +++ b/src/client/linux/minidump_writer/linux_dumper.h @@ -103,6 +103,11 @@ class LinuxDumper { const wasteful_vector<pid_t> &threads() { return threads_; } const wasteful_vector<MappingInfo*> &mappings() { return mappings_; } const MappingInfo* FindMapping(const void* address) const; + // Find the mapping which the given memory address falls in. Unlike + // FindMapping, this method uses the unadjusted mapping address + // ranges from the kernel, rather than the ranges that have had the + // load bias applied. + const MappingInfo* FindMappingNoBias(uintptr_t address) const; const wasteful_vector<elf_aux_val_t>& auxv() { return auxv_; } // Find a block of memory to take as the stack given the top of stack pointer. @@ -111,6 +116,19 @@ class LinuxDumper { // stack_top: the current top of the stack bool GetStackInfo(const void** stack, size_t* stack_len, uintptr_t stack_top); + // Test whether |stack_copy| contains a pointer-aligned word that + // could be an address within a given mapping. + // stack_copy: a copy of the stack to check. |stack_copy| might + // not be word aligned, but it represents word aligned + // data copied from another location. + // stack_len: the length of the allocation pointed to by |stack_copy|. + // sp_offset: the offset relative to stack_copy that reflects the + // current value of the stack pointer. + // mapping: the mapping against which to test stack words. + bool StackHasPointerToMapping(const uint8_t* stack_copy, size_t stack_len, + uintptr_t sp_offset, + const MappingInfo& mapping); + PageAllocator* allocator() { return &allocator_; } // Copy content of |length| bytes from a given process |child|, |