1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // Support for collecting useful information when crashing.
13 CrashReason() : filename(0), line_number(0), message(0), depth(0) {}
19 // We'll also store a bit of stack trace context at the time of crash as
20 // it may not be available later on.
24 // We'll try to store some trace information if it's available - this should
25 // reflect information from TraceContext::Thread()->tracer()->ToString().
26 // This field should probably not be set from within a signal handler or
27 // low-level code unless absolutely safe to do so.
31 // Stores "reason" as an explanation for why the process is about to
32 // crash. The reason and its contents must remain live for the life
33 // of the process. Only the first reason is kept.
34 void SetCrashReason(const CrashReason
* reason
);
36 // Returns first reason passed to SetCrashReason(), or NULL.
37 const CrashReason
* GetCrashReason();
41 #endif // BASE_CRASH_H_