Loading cmds/lshal/Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -75,7 +75,7 @@ cc_test { defaults: ["lshal_defaults"], gtest: true, static_libs: [ "android.hardware.tests.baz@1.0", "android.hardware.tests.inheritance@1.0", "libgmock", ], shared_libs: [ Loading cmds/lshal/DebugCommand.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ Status DebugCommand::parseArgs(const Arg &arg) { // Optargs cannnot be used because the flag should not be considered set // if it should really be contained in mOptions. if (std::string(arg.argv[optind]) == "-E") { mExcludesParentInstances = true; mParentDebugInfoLevel = ParentDebugInfoLevel::NOTHING; optind++; } Loading Loading @@ -67,7 +67,7 @@ Status DebugCommand::main(const Arg &arg) { return mLshal.emitDebugInfo( pair.first, pair.second.empty() ? "default" : pair.second, mOptions, mExcludesParentInstances, mParentDebugInfoLevel, mLshal.out().buf(), mLshal.err()); } Loading cmds/lshal/DebugCommand.h +3 −3 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ #include <android-base/macros.h> #include "Command.h" #include "ParentDebugInfoLevel.h" #include "utils.h" namespace android { Loading @@ -42,9 +43,8 @@ private: std::string mInterfaceName; std::vector<std::string> mOptions; // Outputs the actual descriptor of a hal instead of the debug output // if the arguments provided are a superclass of the actual hal impl. bool mExcludesParentInstances; // See comment on ParentDebugInfoLevel. ParentDebugInfoLevel mParentDebugInfoLevel = ParentDebugInfoLevel::FULL; DISALLOW_COPY_AND_ASSIGN(DebugCommand); }; Loading cmds/lshal/ListCommand.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -555,7 +555,7 @@ void ListCommand::dumpTable(const NullableOStream<std::ostream>& out) const { std::stringstream ss; auto pair = splitFirst(iName, '/'); mLshal.emitDebugInfo(pair.first, pair.second, {}, false /* excludesParentInstances */, ss, ParentDebugInfoLevel::FQNAME_ONLY, ss, NullableOStream<std::ostream>(nullptr)); return ss.str(); }; Loading cmds/lshal/Lshal.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -101,7 +101,7 @@ Status Lshal::emitDebugInfo( const std::string &interfaceName, const std::string &instanceName, const std::vector<std::string> &options, bool excludesParentInstances, ParentDebugInfoLevel parentDebugInfoLevel, std::ostream &out, NullableOStream<std::ostream> err) const { using android::hidl::base::V1_0::IBase; Loading @@ -126,7 +126,7 @@ Status Lshal::emitDebugInfo( return NO_INTERFACE; } if (excludesParentInstances) { if (parentDebugInfoLevel != ParentDebugInfoLevel::FULL) { const std::string descriptor = getDescriptor(base.get()); if (descriptor.empty()) { std::string msg = interfaceName + "/" + instanceName + " getDescriptor failed"; Loading @@ -134,6 +134,9 @@ Status Lshal::emitDebugInfo( LOG(ERROR) << msg; } if (descriptor != interfaceName) { if (parentDebugInfoLevel == ParentDebugInfoLevel::FQNAME_ONLY) { out << "[See " << descriptor << "/" << instanceName << "]"; } return OK; } } Loading Loading
cmds/lshal/Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -75,7 +75,7 @@ cc_test { defaults: ["lshal_defaults"], gtest: true, static_libs: [ "android.hardware.tests.baz@1.0", "android.hardware.tests.inheritance@1.0", "libgmock", ], shared_libs: [ Loading
cmds/lshal/DebugCommand.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ Status DebugCommand::parseArgs(const Arg &arg) { // Optargs cannnot be used because the flag should not be considered set // if it should really be contained in mOptions. if (std::string(arg.argv[optind]) == "-E") { mExcludesParentInstances = true; mParentDebugInfoLevel = ParentDebugInfoLevel::NOTHING; optind++; } Loading Loading @@ -67,7 +67,7 @@ Status DebugCommand::main(const Arg &arg) { return mLshal.emitDebugInfo( pair.first, pair.second.empty() ? "default" : pair.second, mOptions, mExcludesParentInstances, mParentDebugInfoLevel, mLshal.out().buf(), mLshal.err()); } Loading
cmds/lshal/DebugCommand.h +3 −3 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ #include <android-base/macros.h> #include "Command.h" #include "ParentDebugInfoLevel.h" #include "utils.h" namespace android { Loading @@ -42,9 +43,8 @@ private: std::string mInterfaceName; std::vector<std::string> mOptions; // Outputs the actual descriptor of a hal instead of the debug output // if the arguments provided are a superclass of the actual hal impl. bool mExcludesParentInstances; // See comment on ParentDebugInfoLevel. ParentDebugInfoLevel mParentDebugInfoLevel = ParentDebugInfoLevel::FULL; DISALLOW_COPY_AND_ASSIGN(DebugCommand); }; Loading
cmds/lshal/ListCommand.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -555,7 +555,7 @@ void ListCommand::dumpTable(const NullableOStream<std::ostream>& out) const { std::stringstream ss; auto pair = splitFirst(iName, '/'); mLshal.emitDebugInfo(pair.first, pair.second, {}, false /* excludesParentInstances */, ss, ParentDebugInfoLevel::FQNAME_ONLY, ss, NullableOStream<std::ostream>(nullptr)); return ss.str(); }; Loading
cmds/lshal/Lshal.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -101,7 +101,7 @@ Status Lshal::emitDebugInfo( const std::string &interfaceName, const std::string &instanceName, const std::vector<std::string> &options, bool excludesParentInstances, ParentDebugInfoLevel parentDebugInfoLevel, std::ostream &out, NullableOStream<std::ostream> err) const { using android::hidl::base::V1_0::IBase; Loading @@ -126,7 +126,7 @@ Status Lshal::emitDebugInfo( return NO_INTERFACE; } if (excludesParentInstances) { if (parentDebugInfoLevel != ParentDebugInfoLevel::FULL) { const std::string descriptor = getDescriptor(base.get()); if (descriptor.empty()) { std::string msg = interfaceName + "/" + instanceName + " getDescriptor failed"; Loading @@ -134,6 +134,9 @@ Status Lshal::emitDebugInfo( LOG(ERROR) << msg; } if (descriptor != interfaceName) { if (parentDebugInfoLevel == ParentDebugInfoLevel::FQNAME_ONLY) { out << "[See " << descriptor << "/" << instanceName << "]"; } return OK; } } Loading