mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2024-11-24 13:55:53 +01:00
Fix format specifier in proc maps to support 32-bit architectures.
R=ivanpe@chromium.org Review URL: https://codereview.chromium.org/1288323003 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1486 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
cde8616abf
commit
8794e39888
@ -23,8 +23,8 @@ struct MappedMemoryRegion {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// The address range [start,end) of mapped memory.
|
// The address range [start,end) of mapped memory.
|
||||||
uintptr_t start;
|
uint64_t start;
|
||||||
uintptr_t end;
|
uint64_t end;
|
||||||
|
|
||||||
// Byte offset into |path| of the range mapped into memory.
|
// Byte offset into |path| of the range mapped into memory.
|
||||||
uint64_t offset;
|
uint64_t offset;
|
||||||
|
@ -61,10 +61,10 @@ bool ParseProcMaps(const std::string& input,
|
|||||||
// The final %n term captures the offset in the input string, which is used
|
// The final %n term captures the offset in the input string, which is used
|
||||||
// to determine the path name. It *does not* increment the return value.
|
// to determine the path name. It *does not* increment the return value.
|
||||||
// Refer to man 3 sscanf for details.
|
// Refer to man 3 sscanf for details.
|
||||||
if (sscanf(line, "%lx-%lx %4c %lx %hhx:%hhx %ld %n",
|
if (sscanf(line, "%" SCNx64 "-%" SCNx64 " %4c %" SCNx64" %hhx:%hhx %"
|
||||||
®ion.start, ®ion.end, permissions, ®ion.offset,
|
SCNd64 " %n", ®ion.start, ®ion.end, permissions,
|
||||||
®ion.major_device, ®ion.minor_device, ®ion.inode,
|
®ion.offset, ®ion.major_device, ®ion.minor_device,
|
||||||
&path_index) < 7) {
|
®ion.inode, &path_index) < 7) {
|
||||||
BPLOG(ERROR) << "sscanf failed for line: " << line;
|
BPLOG(ERROR) << "sscanf failed for line: " << line;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user