Linux Breakpad: Use MD_MODULE_SIZE in place of sizeof(MDRawModule).
BUG=none TEST=minidump_dump can read the generated .dmp files. Review URL: http://codereview.chromium.org/200013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25427 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
breakpad/linux
@ -420,7 +420,7 @@ ParseModuleStream(CrashedProcess* crashinfo, MMappedRange range) {
|
||||
CrashedProcess::Mapping mapping;
|
||||
const MDRawModule* rawmodule =
|
||||
(MDRawModule*) range.GetArrayElement(sizeof(uint32_t),
|
||||
sizeof(MDRawModule), i);
|
||||
MD_MODULE_SIZE, i);
|
||||
mapping.start_address = rawmodule->base_of_image;
|
||||
mapping.end_address = rawmodule->size_of_image + rawmodule->base_of_image;
|
||||
|
||||
|
@ -500,7 +500,7 @@ class MinidumpWriter {
|
||||
}
|
||||
|
||||
TypedMDRVA<uint32_t> list(&minidump_writer_);
|
||||
if (!list.AllocateObjectAndArray(num_output_mappings, sizeof(MDRawModule)))
|
||||
if (!list.AllocateObjectAndArray(num_output_mappings, MD_MODULE_SIZE))
|
||||
return false;
|
||||
|
||||
dirent->stream_type = MD_MODULE_LIST_STREAM;
|
||||
@ -513,7 +513,7 @@ class MinidumpWriter {
|
||||
continue;
|
||||
|
||||
MDRawModule mod;
|
||||
my_memset(&mod, 0, sizeof(mod));
|
||||
my_memset(&mod, 0, MD_MODULE_SIZE);
|
||||
mod.base_of_image = mapping.start_addr;
|
||||
mod.size_of_image = mapping.size;
|
||||
const size_t filepath_len = my_strlen(mapping.name);
|
||||
@ -569,7 +569,7 @@ class MinidumpWriter {
|
||||
return false;
|
||||
mod.module_name_rva = ld.rva;
|
||||
|
||||
list.CopyIndexAfterObject(j++, &mod, sizeof(mod));
|
||||
list.CopyIndexAfterObject(j++, &mod, MD_MODULE_SIZE);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user