1a11d129aa8ad9fa123e72d0663c327d5578d2602Eric Christopher// Copyright 2013 The Chromium Authors. All rights reserved. 2a11d129aa8ad9fa123e72d0663c327d5578d2602Eric Christopher// Use of this source code is governed by a BSD-style license that can be 3a11d129aa8ad9fa123e72d0663c327d5578d2602Eric Christopher// found in the LICENSE file. 4a11d129aa8ad9fa123e72d0663c327d5578d2602Eric Christopher 5a11d129aa8ad9fa123e72d0663c327d5578d2602Eric Christopher#ifndef BASE_DEBUG_DUMP_WITHOUT_CRASHING_H_ 6a11d129aa8ad9fa123e72d0663c327d5578d2602Eric Christopher#define BASE_DEBUG_DUMP_WITHOUT_CRASHING_H_ 7a11d129aa8ad9fa123e72d0663c327d5578d2602Eric Christopher 8a11d129aa8ad9fa123e72d0663c327d5578d2602Eric Christopher#include "base/base_export.h" 9a11d129aa8ad9fa123e72d0663c327d5578d2602Eric Christopher#include "base/compiler_specific.h" 10a11d129aa8ad9fa123e72d0663c327d5578d2602Eric Christopher#include "build/build_config.h" 11 12namespace base { 13 14namespace debug { 15 16// Handler to silently dump the current process without crashing. 17// Before calling this function, call SetDumpWithoutCrashingFunction to pass a 18// function pointer, typically chrome!DumpProcessWithoutCrash. See example code 19// in chrome_main.cc that does this for chrome.dll. 20BASE_EXPORT void DumpWithoutCrashing(); 21 22// Sets a function that'll be invoked to dump the current process when 23// DumpWithoutCrashing() is called. 24BASE_EXPORT void SetDumpWithoutCrashingFunction(void (CDECL *function)()); 25 26} // namespace debug 27 28} // namespace base 29 30#endif // BASE_DEBUG_DUMP_WITHOUT_CRASHING_H_ 31