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

Side by Side Diff: runtime/bin/platform_linux.cc

Issue 2668443004: Make the segfault handler attempt to symbolize Dart frames. (Closed)
Patch Set: Created 3 years, 10 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 | runtime/bin/platform_macos.cc » ('j') | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "platform/globals.h" 5 #include "platform/globals.h"
6 #if defined(TARGET_OS_LINUX) 6 #if defined(TARGET_OS_LINUX)
7 7
8 #include "bin/platform.h" 8 #include "bin/platform.h"
9 9
10 #include <signal.h> // NOLINT 10 #include <signal.h> // NOLINT
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 return false; 47 return false;
48 } 48 }
49 if (sigaddset(&act.sa_mask, SIGPROF) != 0) { 49 if (sigaddset(&act.sa_mask, SIGPROF) != 0) {
50 perror("sigaddset() failed"); 50 perror("sigaddset() failed");
51 return false; 51 return false;
52 } 52 }
53 if (sigaction(SIGSEGV, &act, NULL) != 0) { 53 if (sigaction(SIGSEGV, &act, NULL) != 0) {
54 perror("sigaction() failed."); 54 perror("sigaction() failed.");
55 return false; 55 return false;
56 } 56 }
57 if (sigaction(SIGTRAP, &act, NULL) != 0) {
58 perror("sigaction() failed.");
59 return false;
60 }
57 return true; 61 return true;
58 } 62 }
59 63
60 64
61 int Platform::NumberOfProcessors() { 65 int Platform::NumberOfProcessors() {
62 return sysconf(_SC_NPROCESSORS_ONLN); 66 return sysconf(_SC_NPROCESSORS_ONLN);
63 } 67 }
64 68
65 69
66 const char* Platform::OperatingSystem() { 70 const char* Platform::OperatingSystem() {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 111
108 112
109 void Platform::Exit(int exit_code) { 113 void Platform::Exit(int exit_code) {
110 exit(exit_code); 114 exit(exit_code);
111 } 115 }
112 116
113 } // namespace bin 117 } // namespace bin
114 } // namespace dart 118 } // namespace dart
115 119
116 #endif // defined(TARGET_OS_LINUX) 120 #endif // defined(TARGET_OS_LINUX)
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/platform_macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698