Sha256: e5857428f0cf76db749c49bb1120bb8013f6f38c2aa9927d894304076a81f76c

Contents?: true

Size: 1.27 KB

Versions: 18

Compression:

Stored size: 1.27 KB

Contents

// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Support for collecting useful information when crashing.

#ifndef BASE_CRASH_H_
#define BASE_CRASH_H_

namespace base {

struct CrashReason {
  CrashReason() : filename(0), line_number(0), message(0), depth(0) {}

  const char* filename;
  int line_number;
  const char* message;

  // We'll also store a bit of stack trace context at the time of crash as
  // it may not be available later on.
  void* stack[32];
  int depth;

  // We'll try to store some trace information if it's available - this should
  // reflect information from TraceContext::Thread()->tracer()->ToString().
  // This field should probably not be set from within a signal handler or
  // low-level code unless absolutely safe to do so.
  char trace_info[512];
};

// Stores "reason" as an explanation for why the process is about to
// crash.  The reason and its contents must remain live for the life
// of the process.  Only the first reason is kept.
void SetCrashReason(const CrashReason* reason);

// Returns first reason passed to SetCrashReason(), or NULL.
const CrashReason* GetCrashReason();

}  // namespace base

#endif  // BASE_CRASH_H_

Version data entries

18 entries across 18 versions & 4 rubygems

Version Path
cld-0.13.0 ext/cld/base/crash.h
language_detection-0.1.1 ext/cld/base/crash.h
cld-0.12.0 ext/cld/base/crash.h
language_detection-0.1.0 ext/cld/base/crash.h
cld-0.11.0 ext/cld/base/crash.h
cld-0.10.0 ext/cld/base/crash.h
cld-0.8.0 ext/cld/base/crash.h
cld-fixed-0.7.1 ext/cld/base/crash.h
cld-0.7.0 ext/cld/base/crash.h
language_detection-0.0.2 ext/cld/base/crash.h
language_detection-0.0.1 ext/cld/base/crash.h
cld-0.6.0 ext/cld/base/crash.h
cld-0.5.0 ext/cld/base/crash.h
krukid-cld-0.4.0 base/crash.h
cld-0.4.0 base/crash.h
cld-0.3.0 base/crash.h
cld-0.2.0 base/crash.h
cld-0.1.0 base/crash.h