LEFT | RIGHT |
(no file at all) | |
1 // Copyright (c) 2009, Google Inc. | 1 // Copyright (c) 2009, Google Inc. |
2 // All rights reserved. | 2 // All rights reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // met: |
7 // | 7 // |
8 // * Redistributions of source code must retain the above copyright | 8 // * Redistributions of source code must retain the above copyright |
9 // notice, this list of conditions and the following disclaimer. | 9 // notice, this list of conditions and the following disclaimer. |
10 // * Redistributions in binary form must reproduce the above | 10 // * Redistributions in binary form must reproduce the above |
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
990 g_custom_so_basedir = argv[argi]; | 990 g_custom_so_basedir = argv[argi]; |
991 } else { | 991 } else { |
992 return usage(argv[0]); | 992 return usage(argv[0]); |
993 } | 993 } |
994 argi++; | 994 argi++; |
995 } | 995 } |
996 | 996 |
997 if (argc != argi + 1) | 997 if (argc != argi + 1) |
998 return usage(argv[0]); | 998 return usage(argv[0]); |
999 | 999 |
1000 MemoryMappedFile mapped_file(argv[argi]); | 1000 MemoryMappedFile mapped_file(argv[argi], 0); |
1001 if (!mapped_file.data()) { | 1001 if (!mapped_file.data()) { |
1002 fprintf(stderr, "Failed to mmap dump file\n"); | 1002 fprintf(stderr, "Failed to mmap dump file\n"); |
1003 return 1; | 1003 return 1; |
1004 } | 1004 } |
1005 | 1005 |
1006 MinidumpMemoryRange dump(mapped_file.data(), mapped_file.size()); | 1006 MinidumpMemoryRange dump(mapped_file.data(), mapped_file.size()); |
1007 | 1007 |
1008 const MDRawHeader* header = dump.GetData<MDRawHeader>(0); | 1008 const MDRawHeader* header = dump.GetData<MDRawHeader>(0); |
1009 | 1009 |
1010 CrashedProcess crashinfo; | 1010 CrashedProcess crashinfo; |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1200 iter != crashinfo.mappings.end(); ++iter) { | 1200 iter != crashinfo.mappings.end(); ++iter) { |
1201 const CrashedProcess::Mapping& mapping = iter->second; | 1201 const CrashedProcess::Mapping& mapping = iter->second; |
1202 if (mapping.data.size()) { | 1202 if (mapping.data.size()) { |
1203 if (!writea(1, mapping.data.c_str(), mapping.data.size())) | 1203 if (!writea(1, mapping.data.c_str(), mapping.data.size())) |
1204 return 1; | 1204 return 1; |
1205 } | 1205 } |
1206 } | 1206 } |
1207 | 1207 |
1208 return 0; | 1208 return 0; |
1209 } | 1209 } |
LEFT | RIGHT |