Issue 261/262: 64-bit bug fix when iterating through load commands of a 64-bit binary, and added new test case for ReadImageInfoForTask

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@266 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
nealsid 2008-05-05 18:20:04 +00:00
parent d6f0f92de3
commit 47df365bf8
4 changed files with 21 additions and 140 deletions

View file

@ -210,7 +210,11 @@ void DynamicImage::CalculateMemoryInfo() {
reinterpret_cast<const struct load_command *>(header + 1);
for (unsigned int i = 0; cmd && (i < header->ncmds); ++i) {
#ifdef __LP64__
if (cmd->cmd == LC_SEGMENT_64) {
#else
if (cmd->cmd == LC_SEGMENT) {
#endif
const breakpad_mach_segment_command *seg =
reinterpret_cast<const breakpad_mach_segment_command *>(cmd);