tombstoned: Add a shared library version of libtombstoned_client...
.. for ART and the frameworks to link against. In the new stack dumping scheme (see related bug), the Java runtime will communicate with tombstoned in order to obtain a FD to which it can write its traces. Also move things around to separate headers that are private implementation details from headers that constitute the public debuggerd API. There are currently only three such headers : - tombstoned/tombstoned.h - debuggerd/client.h - debuggerd/handler.h Bug: 32064548 Test: make Change-Id: If1b8578550e373d84828b180bbe585f1088d1aa3
This commit is contained in:
parent
62db5fcee0
commit
2d377cd688
|
@ -11,12 +11,32 @@ cc_defaults {
|
|||
local_include_dirs: ["include"],
|
||||
}
|
||||
|
||||
// Utility library to tombstoned and get an output fd.
|
||||
cc_library_static {
|
||||
cc_library_shared {
|
||||
name: "libtombstoned_client",
|
||||
defaults: ["debuggerd_defaults"],
|
||||
srcs: [
|
||||
"tombstoned_client.cpp",
|
||||
"tombstoned/tombstoned_client.cpp",
|
||||
"util.cpp",
|
||||
],
|
||||
|
||||
static_libs: [
|
||||
"libasync_safe"
|
||||
],
|
||||
|
||||
shared_libs: [
|
||||
"libcutils",
|
||||
"libbase",
|
||||
],
|
||||
|
||||
export_include_dirs: ["tombstoned/include"]
|
||||
}
|
||||
|
||||
// Utility library to tombstoned and get an output fd.
|
||||
cc_library_static {
|
||||
name: "libtombstoned_client_static",
|
||||
defaults: ["debuggerd_defaults"],
|
||||
srcs: [
|
||||
"tombstoned/tombstoned_client.cpp",
|
||||
"util.cpp",
|
||||
],
|
||||
|
||||
|
@ -25,6 +45,8 @@ cc_library_static {
|
|||
"libcutils",
|
||||
"libbase",
|
||||
],
|
||||
|
||||
export_include_dirs: ["tombstoned/include"]
|
||||
}
|
||||
|
||||
// Core implementation, linked into libdebuggerd_handler and the dynamic linker.
|
||||
|
@ -64,7 +86,7 @@ cc_library_static {
|
|||
|
||||
whole_static_libs: [
|
||||
"libdebuggerd_handler_core",
|
||||
"libtombstoned_client",
|
||||
"libtombstoned_client_static",
|
||||
"libasync_safe",
|
||||
"libbase",
|
||||
"libdebuggerd",
|
||||
|
@ -159,10 +181,8 @@ cc_test {
|
|||
srcs: [
|
||||
"client/debuggerd_client_test.cpp",
|
||||
"debuggerd_test.cpp",
|
||||
"tombstoned_client.cpp",
|
||||
"util.cpp"
|
||||
],
|
||||
static_libs: ["libasync_safe"],
|
||||
static_libs: ["libasync_safe", "libtombstoned_client_static"],
|
||||
},
|
||||
},
|
||||
|
||||
|
@ -171,6 +191,7 @@ cc_test {
|
|||
"libbase",
|
||||
"libcutils",
|
||||
"libdebuggerd_client",
|
||||
"liblog"
|
||||
],
|
||||
|
||||
static_libs: [
|
||||
|
@ -211,7 +232,7 @@ cc_binary {
|
|||
},
|
||||
|
||||
static_libs: [
|
||||
"libtombstoned_client",
|
||||
"libtombstoned_client_static",
|
||||
"libdebuggerd",
|
||||
"libcutils",
|
||||
],
|
||||
|
|
|
@ -31,9 +31,10 @@
|
|||
#include <android-base/stringprintf.h>
|
||||
#include <android-base/unique_fd.h>
|
||||
#include <cutils/sockets.h>
|
||||
#include <debuggerd/handler.h>
|
||||
#include <debuggerd/protocol.h>
|
||||
#include <debuggerd/util.h>
|
||||
|
||||
#include "debuggerd/handler.h"
|
||||
#include "protocol.h"
|
||||
#include "util.h"
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include <android-base/strings.h>
|
||||
#include <android-base/unique_fd.h>
|
||||
|
||||
#include <debuggerd/util.h>
|
||||
#include "util.h"
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
using android::base::unique_fd;
|
||||
|
|
|
@ -48,9 +48,9 @@
|
|||
#include "utility.h"
|
||||
|
||||
#include "debuggerd/handler.h"
|
||||
#include "debuggerd/protocol.h"
|
||||
#include "debuggerd/tombstoned.h"
|
||||
#include "debuggerd/util.h"
|
||||
#include "protocol.h"
|
||||
#include "tombstoned/tombstoned.h"
|
||||
#include "util.h"
|
||||
|
||||
using android::base::unique_fd;
|
||||
using android::base::ReadFileToString;
|
||||
|
|
|
@ -27,8 +27,8 @@
|
|||
#include <android-base/parseint.h>
|
||||
#include <android-base/unique_fd.h>
|
||||
#include <debuggerd/client.h>
|
||||
#include <debuggerd/util.h>
|
||||
#include <selinux/selinux.h>
|
||||
#include "util.h"
|
||||
|
||||
using android::base::unique_fd;
|
||||
|
||||
|
|
|
@ -35,12 +35,13 @@
|
|||
#include <android-base/strings.h>
|
||||
#include <android-base/unique_fd.h>
|
||||
#include <cutils/sockets.h>
|
||||
#include <debuggerd/handler.h>
|
||||
#include <debuggerd/protocol.h>
|
||||
#include <debuggerd/tombstoned.h>
|
||||
#include <debuggerd/util.h>
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "debuggerd/handler.h"
|
||||
#include "protocol.h"
|
||||
#include "tombstoned/tombstoned.h"
|
||||
#include "util.h"
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
using android::base::unique_fd;
|
||||
|
||||
|
|
|
@ -42,8 +42,8 @@
|
|||
#include <async_safe/log.h>
|
||||
|
||||
#include "debuggerd/handler.h"
|
||||
#include "debuggerd/tombstoned.h"
|
||||
#include "debuggerd/util.h"
|
||||
#include "tombstoned/tombstoned.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "backtrace.h"
|
||||
#include "tombstone.h"
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
#include <android-base/unique_fd.h>
|
||||
#include <cutils/sockets.h>
|
||||
|
||||
#include "debuggerd/protocol.h"
|
||||
#include "debuggerd/util.h"
|
||||
#include "protocol.h"
|
||||
#include "util.h"
|
||||
|
||||
using android::base::unique_fd;
|
||||
|
||||
|
|
|
@ -35,8 +35,8 @@
|
|||
#include <cutils/sockets.h>
|
||||
|
||||
#include "debuggerd/handler.h"
|
||||
#include "debuggerd/protocol.h"
|
||||
#include "debuggerd/util.h"
|
||||
#include "protocol.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "intercept_manager.h"
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "debuggerd/tombstoned.h"
|
||||
#include "tombstoned/tombstoned.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
@ -25,8 +25,8 @@
|
|||
#include <async_safe/log.h>
|
||||
#include <cutils/sockets.h>
|
||||
|
||||
#include "debuggerd/protocol.h"
|
||||
#include "debuggerd/util.h"
|
||||
#include "protocol.h"
|
||||
#include "util.h"
|
||||
|
||||
using android::base::unique_fd;
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "debuggerd/util.h"
|
||||
#include "util.h"
|
||||
|
||||
#include <sys/socket.h>
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
|||
|
||||
#include <android-base/unique_fd.h>
|
||||
#include <cutils/sockets.h>
|
||||
#include <debuggerd/protocol.h>
|
||||
#include "protocol.h"
|
||||
|
||||
using android::base::unique_fd;
|
||||
|
||||
|
|
Loading…
Reference in New Issue