michael@0: /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- michael@0: * vim: sw=4 ts=4 et : michael@0: */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef mozilla_mozalloc_abort_h michael@0: #define mozilla_mozalloc_abort_h michael@0: michael@0: #include "mozilla/Attributes.h" michael@0: michael@0: #if defined(MOZALLOC_EXPORT) michael@0: // do nothing: it's been defined to __declspec(dllexport) by michael@0: // mozalloc*.cpp on platforms where that's required michael@0: #elif defined(XP_WIN) michael@0: # define MOZALLOC_EXPORT __declspec(dllimport) michael@0: #elif defined(HAVE_VISIBILITY_ATTRIBUTE) michael@0: /* Make sure symbols are still exported even if we're wrapped in a michael@0: * |visibility push(hidden)| blanket. */ michael@0: # define MOZALLOC_EXPORT __attribute__ ((visibility ("default"))) michael@0: #else michael@0: # define MOZALLOC_EXPORT michael@0: #endif michael@0: michael@0: /** michael@0: * Terminate this process in such a way that breakpad is triggered, if michael@0: * at all possible. michael@0: * michael@0: * Note: MOZ_NORETURN seems to break crash stacks on ARM, so we don't michael@0: * use that annotation there. michael@0: */ michael@0: MOZALLOC_EXPORT michael@0: #if !defined(__arm__) michael@0: MOZ_NORETURN michael@0: #endif michael@0: void mozalloc_abort(const char* const msg); michael@0: michael@0: michael@0: #endif /* ifndef mozilla_mozalloc_abort_h */