mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2024-12-23 15:35:27 +00:00
[mac] Teach dump_syms to handle additional zerofill sections
This patch allows dump_syms to handle S_THREAD_LOCAL_ZEROFILL and S_GB_ZEROFILL section in the same way as the more common S_ZEROFILL section. Previously, dump_syms would fail to dump a binary containing a __DATA,__thread_bss section, because it tried to look up its data (and failed). R=mark@chromium.org Review URL: https://codereview.chromium.org/1369233003 . Patch from Pavel Labath <labath@google.com>.
This commit is contained in:
parent
679d70f50b
commit
01c8f7cf46
|
@ -481,7 +481,9 @@ bool Reader::WalkSegmentSections(const Segment &segment,
|
||||||
reporter_->SectionsMissing(segment.name);
|
reporter_->SectionsMissing(segment.name);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ((section.flags & SECTION_TYPE) == S_ZEROFILL) {
|
const uint32_t section_type = section.flags & SECTION_TYPE;
|
||||||
|
if (section_type == S_ZEROFILL || section_type == S_THREAD_LOCAL_ZEROFILL ||
|
||||||
|
section_type == S_GB_ZEROFILL) {
|
||||||
// Zero-fill sections have a size, but no contents.
|
// Zero-fill sections have a size, but no contents.
|
||||||
section.contents.start = section.contents.end = NULL;
|
section.contents.start = section.contents.end = NULL;
|
||||||
} else if (segment.contents.start == NULL &&
|
} else if (segment.contents.start == NULL &&
|
||||||
|
|
Loading…
Reference in a new issue