Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(436)

Side by Side Diff: src/client/linux/handler/exception_handler.cc

Issue 2042853002: linux/android: add SIGTRAP to the list of signals handled by the client (Closed) Base URL: https://chromium.googlesource.com/breakpad/breakpad.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 Google Inc. 1 // Copyright (c) 2010 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 return 0; 111 return 0;
112 } 112 }
113 113
114 namespace google_breakpad { 114 namespace google_breakpad {
115 115
116 namespace { 116 namespace {
117 // The list of signals which we consider to be crashes. The default action for 117 // The list of signals which we consider to be crashes. The default action for
118 // all these signals must be Core (see man 7 signal) because we rethrow the 118 // all these signals must be Core (see man 7 signal) because we rethrow the
119 // signal after handling it and expect that it'll be fatal. 119 // signal after handling it and expect that it'll be fatal.
120 const int kExceptionSignals[] = { 120 const int kExceptionSignals[] = {
121 SIGSEGV, SIGABRT, SIGFPE, SIGILL, SIGBUS 121 SIGSEGV, SIGABRT, SIGFPE, SIGILL, SIGBUS, SIGTRAP
122 }; 122 };
123 const int kNumHandledSignals = 123 const int kNumHandledSignals =
124 sizeof(kExceptionSignals) / sizeof(kExceptionSignals[0]); 124 sizeof(kExceptionSignals) / sizeof(kExceptionSignals[0]);
125 struct sigaction old_handlers[kNumHandledSignals]; 125 struct sigaction old_handlers[kNumHandledSignals];
126 bool handlers_installed = false; 126 bool handlers_installed = false;
127 127
128 // InstallAlternateStackLocked will store the newly installed stack in new_stack 128 // InstallAlternateStackLocked will store the newly installed stack in new_stack
129 // and (if it exists) the previously installed stack in old_stack. 129 // and (if it exists) the previously installed stack in old_stack.
130 stack_t old_stack; 130 stack_t old_stack;
131 stack_t new_stack; 131 stack_t new_stack;
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 descriptor.UpdatePath(); 756 descriptor.UpdatePath();
757 if (!google_breakpad::WriteMinidump(descriptor.path(), 757 if (!google_breakpad::WriteMinidump(descriptor.path(),
758 child, 758 child,
759 child_blamed_thread)) 759 child_blamed_thread))
760 return false; 760 return false;
761 761
762 return callback ? callback(descriptor, callback_context, true) : true; 762 return callback ? callback(descriptor, callback_context, true) : true;
763 } 763 }
764 764
765 } // namespace google_breakpad 765 } // namespace google_breakpad
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698