| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 // alternative malloc. Each function should have comment above it detailing the | 63 // alternative malloc. Each function should have comment above it detailing the |
| 64 // context which it runs in. | 64 // context which it runs in. |
| 65 | 65 |
| 66 #include "breakpad/linux/exception_handler.h" | 66 #include "breakpad/linux/exception_handler.h" |
| 67 | 67 |
| 68 #include <errno.h> | 68 #include <errno.h> |
| 69 #include <fcntl.h> | 69 #include <fcntl.h> |
| 70 #include <linux/limits.h> | 70 #include <linux/limits.h> |
| 71 #include <sched.h> | 71 #include <sched.h> |
| 72 #include <signal.h> | 72 #include <signal.h> |
| 73 #include <stdio.h> |
| 73 #include <sys/mman.h> | 74 #include <sys/mman.h> |
| 74 #include <sys/signal.h> | 75 #include <sys/signal.h> |
| 75 #include <sys/syscall.h> | 76 #include <sys/syscall.h> |
| 76 #include <sys/ucontext.h> | 77 #include <sys/ucontext.h> |
| 77 #include <sys/user.h> | 78 #include <sys/user.h> |
| 78 #include <sys/wait.h> | 79 #include <sys/wait.h> |
| 79 #include <unistd.h> | 80 #include <unistd.h> |
| 80 | 81 |
| 81 #include "breakpad/linux/linux_syscall_support.h" | 82 #include "breakpad/linux/linux_syscall_support.h" |
| 82 #include "breakpad/linux/memory.h" | 83 #include "breakpad/linux/memory.h" |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 | 301 |
| 301 // This function runs in a compromised context: see the top of the file. | 302 // This function runs in a compromised context: see the top of the file. |
| 302 // Runs on the cloned process. | 303 // Runs on the cloned process. |
| 303 bool ExceptionHandler::DoDump(pid_t crashing_process, const void* context, | 304 bool ExceptionHandler::DoDump(pid_t crashing_process, const void* context, |
| 304 size_t context_size) { | 305 size_t context_size) { |
| 305 return google_breakpad::WriteMinidump( | 306 return google_breakpad::WriteMinidump( |
| 306 next_minidump_path_c_, crashing_process, context, context_size); | 307 next_minidump_path_c_, crashing_process, context, context_size); |
| 307 } | 308 } |
| 308 | 309 |
| 309 } // namespace google_breakpad | 310 } // namespace google_breakpad |
| OLD | NEW |