call_with_eh_frame.h 926 B

123456789101112131415161718192021222324
  1. // Copyright 2015 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. #ifndef BASE_MAC_CALL_WITH_EH_FRAME_H_
  5. #define BASE_MAC_CALL_WITH_EH_FRAME_H_
  6. #include "base/base_export.h"
  7. namespace base::mac {
  8. // Invokes the specified block in a stack frame with a special exception
  9. // handler. This function creates an exception handling stack frame that
  10. // specifies a custom C++ exception personality routine, which terminates the
  11. // search for an exception handler at this frame.
  12. //
  13. // The purpose of this function is to prevent a try/catch statement in system
  14. // libraries, acting as a global exception handler, from handling exceptions
  15. // in such a way that disrupts the generation of useful stack traces.
  16. void BASE_EXPORT CallWithEHFrame(void (^block)(void));
  17. } // namespace base::mac
  18. #endif // BASE_MAC_CALL_WITH_EH_FRAME_H_