aboutsummaryrefslogtreecommitdiff
path: root/src/processor/minidump.cc
diff options
context:
space:
mode:
authorted.mielczarek@gmail.com <ted.mielczarek@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e>2014-07-11 10:57:30 +0000
committerted.mielczarek@gmail.com <ted.mielczarek@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e>2014-07-11 10:57:30 +0000
commit0a5ebafdf088ae580a005a3ff2df227b98ce0582 (patch)
tree73ea3e1e4f5970840851f6b42d95ad00dbae7748 /src/processor/minidump.cc
parentDon't free pointer in BasicCodeModules::BasicCodeModules before possibly usin... (diff)
downloadbreakpad-0a5ebafdf088ae580a005a3ff2df227b98ce0582.tar.xz
Stringify minidump stream_type constants in minidump_dump output
R=mark at https://breakpad.appspot.com/3704002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1347 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/processor/minidump.cc')
-rw-r--r--src/processor/minidump.cc73
1 files changed, 71 insertions, 2 deletions
diff --git a/src/processor/minidump.cc b/src/processor/minidump.cc
index 99f285ca..ee936719 100644
--- a/src/processor/minidump.cc
+++ b/src/processor/minidump.cc
@@ -4803,6 +4803,72 @@ MinidumpMemoryInfoList* Minidump::GetMemoryInfoList() {
return GetStream(&memory_info_list);
}
+static const char* get_stream_name(uint32_t stream_type) {
+ switch (stream_type) {
+ case MD_UNUSED_STREAM:
+ return "MD_UNUSED_STREAM";
+ case MD_RESERVED_STREAM_0:
+ return "MD_RESERVED_STREAM_0";
+ case MD_RESERVED_STREAM_1:
+ return "MD_RESERVED_STREAM_1";
+ case MD_THREAD_LIST_STREAM:
+ return "MD_THREAD_LIST_STREAM";
+ case MD_MODULE_LIST_STREAM:
+ return "MD_MODULE_LIST_STREAM";
+ case MD_MEMORY_LIST_STREAM:
+ return "MD_MEMORY_LIST_STREAM";
+ case MD_EXCEPTION_STREAM:
+ return "MD_EXCEPTION_STREAM";
+ case MD_SYSTEM_INFO_STREAM:
+ return "MD_SYSTEM_INFO_STREAM";
+ case MD_THREAD_EX_LIST_STREAM:
+ return "MD_THREAD_EX_LIST_STREAM";
+ case MD_MEMORY_64_LIST_STREAM:
+ return "MD_MEMORY_64_LIST_STREAM";
+ case MD_COMMENT_STREAM_A:
+ return "MD_COMMENT_STREAM_A";
+ case MD_COMMENT_STREAM_W:
+ return "MD_COMMENT_STREAM_W";
+ case MD_HANDLE_DATA_STREAM:
+ return "MD_HANDLE_DATA_STREAM";
+ case MD_FUNCTION_TABLE_STREAM:
+ return "MD_FUNCTION_TABLE_STREAM";
+ case MD_UNLOADED_MODULE_LIST_STREAM:
+ return "MD_UNLOADED_MODULE_LIST_STREAM";
+ case MD_MISC_INFO_STREAM:
+ return "MD_MISC_INFO_STREAM";
+ case MD_MEMORY_INFO_LIST_STREAM:
+ return "MD_MEMORY_INFO_LIST_STREAM";
+ case MD_THREAD_INFO_LIST_STREAM:
+ return "MD_THREAD_INFO_LIST_STREAM";
+ case MD_HANDLE_OPERATION_LIST_STREAM:
+ return "MD_HANDLE_OPERATION_LIST_STREAM";
+ case MD_LAST_RESERVED_STREAM:
+ return "MD_LAST_RESERVED_STREAM";
+ case MD_BREAKPAD_INFO_STREAM:
+ return "MD_BREAKPAD_INFO_STREAM";
+ case MD_ASSERTION_INFO_STREAM:
+ return "MD_ASSERTION_INFO_STREAM";
+ case MD_LINUX_CPU_INFO:
+ return "MD_LINUX_CPU_INFO";
+ case MD_LINUX_PROC_STATUS:
+ return "MD_LINUX_PROC_STATUS";
+ case MD_LINUX_LSB_RELEASE:
+ return "MD_LINUX_LSB_RELEASE";
+ case MD_LINUX_CMD_LINE:
+ return "MD_LINUX_CMD_LINE";
+ case MD_LINUX_ENVIRON:
+ return "MD_LINUX_ENVIRON";
+ case MD_LINUX_AUXV:
+ return "MD_LINUX_AUXV";
+ case MD_LINUX_MAPS:
+ return "MD_LINUX_MAPS";
+ case MD_LINUX_DSO_DEBUG:
+ return "MD_LINUX_DSO_DEBUG";
+ default:
+ return "unknown";
+ }
+}
void Minidump::Print() {
if (!valid_) {
@@ -4829,7 +4895,8 @@ void Minidump::Print() {
printf("mDirectory[%d]\n", stream_index);
printf("MDRawDirectory\n");
- printf(" stream_type = %d\n", directory_entry->stream_type);
+ printf(" stream_type = 0x%x (%s)\n", directory_entry->stream_type,
+ get_stream_name(directory_entry->stream_type));
printf(" location.data_size = %d\n",
directory_entry->location.data_size);
printf(" location.rva = 0x%x\n", directory_entry->location.rva);
@@ -4842,7 +4909,9 @@ void Minidump::Print() {
++iterator) {
uint32_t stream_type = iterator->first;
MinidumpStreamInfo info = iterator->second;
- printf(" stream type 0x%x at index %d\n", stream_type, info.stream_index);
+ printf(" stream type 0x%x (%s) at index %d\n", stream_type,
+ get_stream_name(stream_type),
+ info.stream_index);
}
printf("\n");
}