diff options
author | Peter Collingbourne <pcc@google.com> | 2020-03-30 21:36:41 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2020-03-30 21:36:41 +0000 |
commit | aed48830acb6be38d29cd18ff62be15b036edab6 (patch) | |
tree | 66a26dfe976490b52271509feed5d7ee4c8313bb /linker/linker_debuggerd_android.cpp | |
parent | ce8af7ff9ee9f0e8aa1dcba3fca250bbc53cee7c (diff) | |
parent | de9c34601a0be1c73d0e763174564fe0262817fb (diff) |
Merge "Switch to debugger_process_info in bionic."
Diffstat (limited to 'linker/linker_debuggerd_android.cpp')
-rw-r--r-- | linker/linker_debuggerd_android.cpp | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/linker/linker_debuggerd_android.cpp b/linker/linker_debuggerd_android.cpp index 42ea2b7ff..6a816736f 100644 --- a/linker/linker_debuggerd_android.cpp +++ b/linker/linker_debuggerd_android.cpp @@ -33,18 +33,25 @@ #include "linker_gdb_support.h" +#if defined(__ANDROID_APEX__) +static debugger_process_info get_process_info() { + return { + .abort_msg = __libc_shared_globals()->abort_msg, + .fdsan_table = &__libc_shared_globals()->fd_table, + .gwp_asan_state = __libc_shared_globals()->gwp_asan_state, + .gwp_asan_metadata = __libc_shared_globals()->gwp_asan_metadata, + }; +} +#endif + void linker_debuggerd_init() { + // There may be a version mismatch between the bootstrap linker and the crash_dump in the APEX, + // so don't pass in any process info from the bootstrap linker. debuggerd_callbacks_t callbacks = { - .get_abort_message = []() { - return __libc_shared_globals()->abort_msg; - }, - .post_dump = ¬ify_gdb_of_libraries, - .get_gwp_asan_state = []() { - return __libc_shared_globals()->gwp_asan_state; - }, - .get_gwp_asan_metadata = []() { - return __libc_shared_globals()->gwp_asan_metadata; - }, +#if defined(__ANDROID_APEX__) + .get_process_info = get_process_info, +#endif + .post_dump = notify_gdb_of_libraries, }; debuggerd_init(&callbacks); } |