Enable --debug option for "lshal" command.
This calls into live binderized services and logs their "IBase::debug(...)"
output.
Bug: 36520620
Test: make, adb shell lshal, adb shell bugreport
Change-Id: Ida3b0c61eafd9f3de562a5df3af24bbaf383de22
diff --git a/cmds/lshal/Lshal.h b/cmds/lshal/Lshal.h
index c9c6660..a21e86c 100644
--- a/cmds/lshal/Lshal.h
+++ b/cmds/lshal/Lshal.h
@@ -77,6 +77,11 @@
void forEachTable(const std::function<void(Table &)> &f);
void forEachTable(const std::function<void(const Table &)> &f) const;
+ void emitDebugInfo(
+ const sp<hidl::manager::V1_0::IServiceManager> &serviceManager,
+ const std::string &interfaceName,
+ const std::string &instanceName) const;
+
Table mServicesTable{};
Table mPassthroughRefTable{};
Table mImplementationsTable{};
@@ -88,6 +93,10 @@
TableEntrySelect mSelectedColumns = 0;
// If true, cmdlines will be printed instead of pid.
bool mEnableCmdlines = false;
+
+ // If true, calls IBase::debug(...) on each service.
+ bool mEmitDebugInfo = false;
+
bool mVintf = false;
// If an entry does not exist, need to ask /proc/{pid}/cmdline to get it.
// If an entry exist but is an empty string, process might have died.