diff options
author | 2017-06-20 17:48:33 -0700 | |
---|---|---|
committer | 2017-07-13 15:11:39 +0000 | |
commit | 9d45ccc0578570f90d5b2b73ada42c5bfd1c993a (patch) | |
tree | 854e480ed599f4b02a905468dbcd29607fe577eb /libs/binder/Debug.cpp | |
parent | b765fc92bb29986f962fb2f83f948a5906c36be0 (diff) |
Add getBinderKernelReferences
Add a wrapper for the new BINDER_GET_NODE_DEBUG_INFO ioctl for use by
libmemunreachable.
Test: memunreachable_binder_test
Bug: 28275695
Change-Id: Ic112584fa05071bd336974b3a18869077a69389b
Merged-In: Ic112584fa05071bd336974b3a18869077a69389b
(cherry picked from commit b869cc94704d1a3d6226f471984eb33ff1bac7d5)
Diffstat (limited to 'libs/binder/Debug.cpp')
-rw-r--r-- | libs/binder/Debug.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/binder/Debug.cpp b/libs/binder/Debug.cpp index a8f2da5ba5..4ac61a3007 100644 --- a/libs/binder/Debug.cpp +++ b/libs/binder/Debug.cpp @@ -15,6 +15,7 @@ */ #include <binder/Debug.h> +#include <binder/ProcessState.h> #include <utils/misc.h> @@ -294,5 +295,14 @@ void printHexData(int32_t indent, const void *buf, size_t length, } } +ssize_t getBinderKernelReferences(size_t count, uintptr_t* buf) { + sp<ProcessState> proc = ProcessState::selfOrNull(); + if (proc.get() == NULL) { + return 0; + } + + return proc->getKernelReferences(count, buf); +} + }; // namespace android |