| OLD | NEW |
| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 sys_write(2, dump_path, my_strlen(dump_path)); | 50 sys_write(2, dump_path, my_strlen(dump_path)); |
| 51 sys_write(2, "/", 1); | 51 sys_write(2, "/", 1); |
| 52 sys_write(2, minidump_id, my_strlen(minidump_id)); | 52 sys_write(2, minidump_id, my_strlen(minidump_id)); |
| 53 sys_write(2, ".dmp\n", 5); | 53 sys_write(2, ".dmp\n", 5); |
| 54 | 54 |
| 55 return true; | 55 return true; |
| 56 } | 56 } |
| 57 | 57 |
| 58 static void DoSomethingWhichCrashes() { | 58 static void DoSomethingWhichCrashes() { |
| 59 int local_var = 1; | 59 int local_var = 1; |
| 60 *reinterpret_cast<char*>(NULL) = 1; | 60 *reinterpret_cast<volatile char*>(NULL) = 1; |
| 61 } | 61 } |
| 62 | 62 |
| 63 int main() { | 63 int main() { |
| 64 google_breakpad::ExceptionHandler breakpad(".", NULL, DumpCallback, NULL, | 64 google_breakpad::ExceptionHandler breakpad(".", NULL, DumpCallback, NULL, |
| 65 true); | 65 true); |
| 66 DoSomethingWhichCrashes(); | 66 DoSomethingWhichCrashes(); |
| 67 return 0; | 67 return 0; |
| 68 } | 68 } |
| OLD | NEW |