1 // Copyright 2013 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. 4 5 #ifndef BASE_DEBUG_DUMP_WITHOUT_CRASHING_H_ 6 #define BASE_DEBUG_DUMP_WITHOUT_CRASHING_H_ 7 8 #include "base/base_export.h" 9 #include "base/compiler_specific.h" 10 #include "build/build_config.h" 11 12 namespace base { 13 14 namespace 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. 20 BASE_EXPORT void DumpWithoutCrashing(); 21 22 // Sets a function that'll be invoked to dump the current process when 23 // DumpWithoutCrashing() is called. 24 BASE_EXPORT void SetDumpWithoutCrashingFunction(void (CDECL *function)()); 25 26 } // namespace debug 27 28 } // namespace base 29 30 #endif // BASE_DEBUG_DUMP_WITHOUT_CRASHING_H_ 31