MinidumpConstants.def 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. //===- MinidumpConstants.def - Iteration over minidump constants-*- C++ -*-===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. #if !(defined(HANDLE_MDMP_STREAM_TYPE) || defined(HANDLE_MDMP_ARCH) || \
  9. defined(HANDLE_MDMP_PLATFORM) || defined(HANDLE_MDMP_PROTECT) || \
  10. defined(HANDLE_MDMP_MEMSTATE) || defined(HANDLE_MDMP_MEMTYPE))
  11. #error "Missing HANDLE_MDMP definition"
  12. #endif
  13. #ifndef HANDLE_MDMP_STREAM_TYPE
  14. #define HANDLE_MDMP_STREAM_TYPE(CODE, NAME)
  15. #endif
  16. #ifndef HANDLE_MDMP_ARCH
  17. #define HANDLE_MDMP_ARCH(CODE, NAME)
  18. #endif
  19. #ifndef HANDLE_MDMP_PLATFORM
  20. #define HANDLE_MDMP_PLATFORM(CODE, NAME)
  21. #endif
  22. #ifndef HANDLE_MDMP_PROTECT
  23. #define HANDLE_MDMP_PROTECT(CODE, NAME, NATIVENAME)
  24. #endif
  25. #ifndef HANDLE_MDMP_MEMSTATE
  26. #define HANDLE_MDMP_MEMSTATE(CODE, NAME, NATIVENAME)
  27. #endif
  28. #ifndef HANDLE_MDMP_MEMTYPE
  29. #define HANDLE_MDMP_MEMTYPE(CODE, NAME, NATIVENAME)
  30. #endif
  31. HANDLE_MDMP_STREAM_TYPE(0x0003, ThreadList)
  32. HANDLE_MDMP_STREAM_TYPE(0x0004, ModuleList)
  33. HANDLE_MDMP_STREAM_TYPE(0x0005, MemoryList)
  34. HANDLE_MDMP_STREAM_TYPE(0x0006, Exception)
  35. HANDLE_MDMP_STREAM_TYPE(0x0007, SystemInfo)
  36. HANDLE_MDMP_STREAM_TYPE(0x0008, ThreadExList)
  37. HANDLE_MDMP_STREAM_TYPE(0x0009, Memory64List)
  38. HANDLE_MDMP_STREAM_TYPE(0x000a, CommentA)
  39. HANDLE_MDMP_STREAM_TYPE(0x000b, CommentW)
  40. HANDLE_MDMP_STREAM_TYPE(0x000c, HandleData)
  41. HANDLE_MDMP_STREAM_TYPE(0x000d, FunctionTable)
  42. HANDLE_MDMP_STREAM_TYPE(0x000e, UnloadedModuleList)
  43. HANDLE_MDMP_STREAM_TYPE(0x000f, MiscInfo)
  44. HANDLE_MDMP_STREAM_TYPE(0x0010, MemoryInfoList)
  45. HANDLE_MDMP_STREAM_TYPE(0x0011, ThreadInfoList)
  46. HANDLE_MDMP_STREAM_TYPE(0x0012, HandleOperationList)
  47. HANDLE_MDMP_STREAM_TYPE(0x0013, Token)
  48. HANDLE_MDMP_STREAM_TYPE(0x0014, JavascriptData)
  49. HANDLE_MDMP_STREAM_TYPE(0x0015, SystemMemoryInfo)
  50. HANDLE_MDMP_STREAM_TYPE(0x0016, ProcessVMCounters)
  51. // Breakpad extension types. 0x4767 = "Gg"
  52. HANDLE_MDMP_STREAM_TYPE(0x47670001, BreakpadInfo)
  53. HANDLE_MDMP_STREAM_TYPE(0x47670002, AssertionInfo)
  54. // These are additional minidump stream values which are specific to the linux
  55. // breakpad implementation.
  56. HANDLE_MDMP_STREAM_TYPE(0x47670003, LinuxCPUInfo) // /proc/cpuinfo
  57. HANDLE_MDMP_STREAM_TYPE(0x47670004, LinuxProcStatus) // /proc/$x/status
  58. HANDLE_MDMP_STREAM_TYPE(0x47670005, LinuxLSBRelease) // /etc/lsb-release
  59. HANDLE_MDMP_STREAM_TYPE(0x47670006, LinuxCMDLine) // /proc/$x/cmdline
  60. HANDLE_MDMP_STREAM_TYPE(0x47670007, LinuxEnviron) // /proc/$x/environ
  61. HANDLE_MDMP_STREAM_TYPE(0x47670008, LinuxAuxv) // /proc/$x/auxv
  62. HANDLE_MDMP_STREAM_TYPE(0x47670009, LinuxMaps) // /proc/$x/maps
  63. HANDLE_MDMP_STREAM_TYPE(0x4767000A, LinuxDSODebug)
  64. HANDLE_MDMP_STREAM_TYPE(0x4767000B, LinuxProcStat) // /proc/$x/stat
  65. HANDLE_MDMP_STREAM_TYPE(0x4767000C, LinuxProcUptime) // uptime
  66. HANDLE_MDMP_STREAM_TYPE(0x4767000D, LinuxProcFD) // /proc/$x/fd
  67. // Facebook-defined stream types
  68. HANDLE_MDMP_STREAM_TYPE(0xFACE1CA7, FacebookLogcat)
  69. HANDLE_MDMP_STREAM_TYPE(0xFACECAFA, FacebookAppCustomData)
  70. HANDLE_MDMP_STREAM_TYPE(0xFACECAFB, FacebookBuildID)
  71. HANDLE_MDMP_STREAM_TYPE(0xFACECAFC, FacebookAppVersionName)
  72. HANDLE_MDMP_STREAM_TYPE(0xFACECAFD, FacebookJavaStack)
  73. HANDLE_MDMP_STREAM_TYPE(0xFACECAFE, FacebookDalvikInfo)
  74. HANDLE_MDMP_STREAM_TYPE(0xFACECAFF, FacebookUnwindSymbols)
  75. HANDLE_MDMP_STREAM_TYPE(0xFACECB00, FacebookDumpErrorLog)
  76. HANDLE_MDMP_STREAM_TYPE(0xFACECCCC, FacebookAppStateLog)
  77. HANDLE_MDMP_STREAM_TYPE(0xFACEDEAD, FacebookAbortReason)
  78. HANDLE_MDMP_STREAM_TYPE(0xFACEE000, FacebookThreadName)
  79. HANDLE_MDMP_ARCH(0x0000, X86) // PROCESSOR_ARCHITECTURE_INTEL
  80. HANDLE_MDMP_ARCH(0x0001, MIPS) // PROCESSOR_ARCHITECTURE_MIPS
  81. HANDLE_MDMP_ARCH(0x0002, Alpha) // PROCESSOR_ARCHITECTURE_ALPHA
  82. HANDLE_MDMP_ARCH(0x0003, PPC) // PROCESSOR_ARCHITECTURE_PPC
  83. HANDLE_MDMP_ARCH(0x0004, SHX) // PROCESSOR_ARCHITECTURE_SHX (Super-H)
  84. HANDLE_MDMP_ARCH(0x0005, ARM) // PROCESSOR_ARCHITECTURE_ARM
  85. HANDLE_MDMP_ARCH(0x0006, IA64) // PROCESSOR_ARCHITECTURE_IA64
  86. HANDLE_MDMP_ARCH(0x0007, Alpha64) // PROCESSOR_ARCHITECTURE_ALPHA64
  87. HANDLE_MDMP_ARCH(0x0008, MSIL) // PROCESSOR_ARCHITECTURE_MSIL
  88. HANDLE_MDMP_ARCH(0x0009, AMD64) // PROCESSOR_ARCHITECTURE_AMD64
  89. HANDLE_MDMP_ARCH(0x000a, X86Win64) // PROCESSOR_ARCHITECTURE_IA32_ON_WIN64
  90. HANDLE_MDMP_ARCH(0x000c, ARM64) // PROCESSOR_ARCHITECTURE_ARM64
  91. HANDLE_MDMP_ARCH(0x8001, BP_SPARC) // Breakpad-defined value for SPARC
  92. HANDLE_MDMP_ARCH(0x8002, BP_PPC64) // Breakpad-defined value for PPC64
  93. HANDLE_MDMP_ARCH(0x8003, BP_ARM64) // Breakpad-defined value for ARM64
  94. HANDLE_MDMP_ARCH(0x8004, BP_MIPS64) // Breakpad-defined value for MIPS64
  95. HANDLE_MDMP_PLATFORM(0x0000, Win32S) // Win32 on Windows 3.1
  96. HANDLE_MDMP_PLATFORM(0x0001, Win32Windows) // Windows 95-98-Me
  97. HANDLE_MDMP_PLATFORM(0x0002, Win32NT) // Windows NT, 2000+
  98. HANDLE_MDMP_PLATFORM(0x0003, Win32CE) // Windows CE, Windows Mobile, "Handheld"
  99. // Breakpad-defined values.
  100. HANDLE_MDMP_PLATFORM(0x8000, Unix) // Generic Unix-ish
  101. HANDLE_MDMP_PLATFORM(0x8101, MacOSX) // Mac OS X/Darwin
  102. HANDLE_MDMP_PLATFORM(0x8102, IOS) // iOS
  103. HANDLE_MDMP_PLATFORM(0x8201, Linux) // Linux
  104. HANDLE_MDMP_PLATFORM(0x8202, Solaris) // Solaris
  105. HANDLE_MDMP_PLATFORM(0x8203, Android) // Android
  106. HANDLE_MDMP_PLATFORM(0x8204, PS3) // PS3
  107. HANDLE_MDMP_PLATFORM(0x8205, NaCl) // Native Client (NaCl)
  108. HANDLE_MDMP_PROTECT(0x01, NoAccess, PAGE_NO_ACCESS)
  109. HANDLE_MDMP_PROTECT(0x02, ReadOnly, PAGE_READ_ONLY)
  110. HANDLE_MDMP_PROTECT(0x04, ReadWrite, PAGE_READ_WRITE)
  111. HANDLE_MDMP_PROTECT(0x08, WriteCopy, PAGE_WRITE_COPY)
  112. HANDLE_MDMP_PROTECT(0x10, Execute, PAGE_EXECUTE)
  113. HANDLE_MDMP_PROTECT(0x20, ExecuteRead, PAGE_EXECUTE_READ)
  114. HANDLE_MDMP_PROTECT(0x40, ExecuteReadWrite, PAGE_EXECUTE_READ_WRITE)
  115. HANDLE_MDMP_PROTECT(0x80, ExeciteWriteCopy, PAGE_EXECUTE_WRITE_COPY)
  116. HANDLE_MDMP_PROTECT(0x100, Guard, PAGE_GUARD)
  117. HANDLE_MDMP_PROTECT(0x200, NoCache, PAGE_NOCACHE)
  118. HANDLE_MDMP_PROTECT(0x400, WriteCombine, PAGE_WRITECOMBINE)
  119. HANDLE_MDMP_PROTECT(0x40000000, TargetsInvalid, PAGE_TARGETS_INVALID)
  120. HANDLE_MDMP_MEMSTATE(0x01000, Commit, MEM_COMMIT)
  121. HANDLE_MDMP_MEMSTATE(0x02000, Reserve, MEM_RESERVE)
  122. HANDLE_MDMP_MEMSTATE(0x10000, Free, MEM_FREE)
  123. HANDLE_MDMP_MEMTYPE(0x0020000, Private, MEM_PRIVATE)
  124. HANDLE_MDMP_MEMTYPE(0x0040000, Mapped, MEM_MAPPED)
  125. HANDLE_MDMP_MEMTYPE(0x1000000, Image, MEM_IMAGE)
  126. #undef HANDLE_MDMP_STREAM_TYPE
  127. #undef HANDLE_MDMP_ARCH
  128. #undef HANDLE_MDMP_PLATFORM
  129. #undef HANDLE_MDMP_PROTECT
  130. #undef HANDLE_MDMP_MEMSTATE
  131. #undef HANDLE_MDMP_MEMTYPE