Add MD_OS_NACL platform_id value for identifying NaCl minidumps

Change minidump-2-core to accept minidumps with this platform_id value
rather than rejecting them as non-Linux dumps.

Add a missing "break" for a MD_OS_PS3 case.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3424
TEST= tested with work-in-progress NaCl minidump generator

Review URL: https://breakpad.appspot.com/590002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1172 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
mseaborn@chromium.org 2013-05-06 23:33:02 +00:00
parent b43dacb23a
commit 85c352695f
4 changed files with 15 additions and 3 deletions

View File

@ -654,7 +654,8 @@ typedef enum {
MD_OS_LINUX = 0x8201, /* Linux */
MD_OS_SOLARIS = 0x8202, /* Solaris */
MD_OS_ANDROID = 0x8203, /* Android */
MD_OS_PS3 = 0x8204 /* PS3 */
MD_OS_PS3 = 0x8204, /* PS3 */
MD_OS_NACL = 0x8205 /* Native Client (NaCl) */
} MDOSPlatform;
typedef struct {

View File

@ -3307,6 +3307,10 @@ string MinidumpSystemInfo::GetOS() {
os = "ps3";
break;
case MD_OS_NACL:
os = "nacl";
break;
default:
BPLOG(ERROR) << "MinidumpSystemInfo unknown OS for platform " <<
HexString(system_info_.platform_id);

View File

@ -554,6 +554,12 @@ bool MinidumpProcessor::GetOSInfo(Minidump *dump, SystemInfo *info) {
case MD_OS_PS3: {
info->os = "PS3";
break;
}
case MD_OS_NACL: {
info->os = "NaCl";
break;
}
default: {

View File

@ -425,8 +425,9 @@ ParseSystemInfo(CrashedProcess* crashinfo, const MinidumpMemoryRange& range,
#error "This code has not been ported to your platform yet"
#endif
if (!strstr(full_file.GetAsciiMDString(sysinfo->csd_version_rva).c_str(),
"Linux")) {
fprintf(stderr, "This minidump was not generated by Linux.\n");
"Linux") &&
sysinfo->platform_id != MD_OS_NACL) {
fprintf(stderr, "This minidump was not generated by Linux or NaCl.\n");
_exit(1);
}