Add external CrashpadHandlerMain declaration

External callers might also want to call CrashpadHandlerMain, so provide
an externally visibile declaration on Android.

Bug: 973167
Change-Id: Ib9c2a2070e87563acd8af25f8634f1c88ce6681f
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1707897
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Vlad Tsyrklevich <vtsyrklevich@chromium.org>
This commit is contained in:
Vlad Tsyrklevich 2019-07-17 22:32:42 -07:00 committed by Commit Bot
parent 79b59b0a8f
commit 2fb8f98d67
2 changed files with 13 additions and 6 deletions

View File

@ -17,17 +17,13 @@
namespace crashpad {
extern "C" {
//! \brief The `main()` entry point for Android libraries.
//!
//! This symbol is the entry point for crashpad when it is dynamically loaded
//! using /system/bin/linker.
//!
//! \sa CrashpadClient::StartHandlerWithLinkerAtCrash()
__attribute__((visibility("default"), used)) int CrashpadHandlerMain(
int argc,
char* argv[]) {
return HandlerMain(argc, argv, nullptr);
}
} // extern "C"
} // namespace crashpad

View File

@ -15,6 +15,7 @@
#ifndef CRASHPAD_HANDLER_HANDLER_MAIN_H_
#define CRASHPAD_HANDLER_HANDLER_MAIN_H_
#include "build/build_config.h"
#include "handler/user_stream_data_source.h"
namespace crashpad {
@ -34,6 +35,16 @@ int HandlerMain(int argc,
char* argv[],
const UserStreamDataSources* user_stream_sources);
#if defined(OS_ANDROID)
//! \brief The `main()` entry point for Android libraries.
//!
//! This symbol is the entry point for crashpad when it is dynamically loaded
//! using /system/bin/linker.
//!
//! \sa CrashpadClient::StartHandlerWithLinkerAtCrash()
extern "C" int CrashpadHandlerMain(int argc, char* argv[]);
#endif
} // namespace crashpad
#endif // CRASHPAD_HANDLER_HANDLER_MAIN_H_