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

Side by Side Diff: src/platform-linux.cc

Issue 9706097: Add flag to always call DebugBreak on abort (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « src/flag-definitions.h ('k') | src/platform-win32.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 381
382 382
383 void OS::Sleep(int milliseconds) { 383 void OS::Sleep(int milliseconds) {
384 unsigned int ms = static_cast<unsigned int>(milliseconds); 384 unsigned int ms = static_cast<unsigned int>(milliseconds);
385 usleep(1000 * ms); 385 usleep(1000 * ms);
386 } 386 }
387 387
388 388
389 void OS::Abort() { 389 void OS::Abort() {
390 // Redirect to std abort to signal abnormal program termination. 390 // Redirect to std abort to signal abnormal program termination.
391 if (FLAG_break_on_abort) {
392 DebugBreak();
393 }
391 abort(); 394 abort();
392 } 395 }
393 396
394 397
395 void OS::DebugBreak() { 398 void OS::DebugBreak() {
396 // TODO(lrn): Introduce processor define for runtime system (!= V8_ARCH_x, 399 // TODO(lrn): Introduce processor define for runtime system (!= V8_ARCH_x,
397 // which is the architecture of generated code). 400 // which is the architecture of generated code).
398 #if (defined(__arm__) || defined(__thumb__)) 401 #if (defined(__arm__) || defined(__thumb__))
399 # if defined(CAN_USE_ARMV5_INSTRUCTIONS) 402 # if defined(CAN_USE_ARMV5_INSTRUCTIONS)
400 asm("bkpt 0"); 403 asm("bkpt 0");
(...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after
1246 1249
1247 1250
1248 void Sampler::Stop() { 1251 void Sampler::Stop() {
1249 ASSERT(IsActive()); 1252 ASSERT(IsActive());
1250 SignalSender::RemoveActiveSampler(this); 1253 SignalSender::RemoveActiveSampler(this);
1251 SetActive(false); 1254 SetActive(false);
1252 } 1255 }
1253 1256
1254 1257
1255 } } // namespace v8::internal 1258 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/platform-win32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698