mirror of
https://github.com/yuzu-emu/breakpad
synced 2024-11-25 14:18:49 +00:00
Print Crashpad annotation objects
Updates minidump_dump to print out any Crashpad annotation objects that are in a minidump. If an annotation contains a string value, it will be printed out as such, otherwise it will be printed out as hex bytes. Bug: crashpad:329 Change-Id: Ieecd6381c623f9011b16357742f7145a118dbc3c Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/4261631 Reviewed-by: Joshua Peraza <jperaza@chromium.org>
This commit is contained in:
parent
5f72a811c1
commit
984e043d79
1 changed files with 21 additions and 0 deletions
|
@ -5479,6 +5479,27 @@ void MinidumpCrashpadInfo::Print() {
|
|||
printf(" module_list[%d].simple_annotations[\"%s\"] = %s\n",
|
||||
module_index, annot.first.c_str(), annot.second.c_str());
|
||||
}
|
||||
const auto& crashpad_annots =
|
||||
module_crashpad_info_annotation_objects_[module_index];
|
||||
for (const AnnotationObject& annot : crashpad_annots) {
|
||||
std::string str_value;
|
||||
if (annot.type == 1) {
|
||||
// Value represents a C-style string.
|
||||
for (const uint8_t& v : annot.value) {
|
||||
str_value.append(1, static_cast<char>(v));
|
||||
}
|
||||
} else {
|
||||
// Value represents something else.
|
||||
char buffer[3];
|
||||
for (const uint8_t& v : annot.value) {
|
||||
sprintf(buffer, "%X", v);
|
||||
str_value.append(buffer);
|
||||
}
|
||||
}
|
||||
printf(
|
||||
" module_list[%d].crashpad_annotations[\"%s\"] (type = %u) = %s\n",
|
||||
module_index, annot.name.c_str(), annot.type, str_value.c_str());
|
||||
}
|
||||
printf(" address_mask = %" PRIu64 "\n", crashpad_info_.address_mask);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue