lshal: also list libraries in 32-bit.

Add an "Arch" column (selected by -r) to lshal
to show whether the HAL runs in 32 bit or 64 bit.

* For binderized services, whether the process
  runs in 32bit or 64bit (__LP64__)
* For passthrough libraries (-impl.so), whether
  the library is in /{system,vendor,odm}/lib/hw
  or /{system,vendor,odm}lib64/hw

Bug: 35803184
Test: lshal -itrpc
Change-Id: I328da4ad9eacbf2959be4ac2e478c16535a89068
diff --git a/cmds/lshal/TableEntry.h b/cmds/lshal/TableEntry.h
index e55806e..8154cb2 100644
--- a/cmds/lshal/TableEntry.h
+++ b/cmds/lshal/TableEntry.h
@@ -35,6 +35,14 @@
 };
 using TableEntrySource = unsigned int;
 
+enum : unsigned int {
+    ARCH_UNKNOWN = 0,
+    ARCH64       = 1 << 0,
+    ARCH32       = 1 << 1,
+    ARCH_BOTH    = ARCH32 | ARCH64
+};
+using Architecture = unsigned int;
+
 struct TableEntry {
     std::string interfaceName;
     std::string transport;
@@ -44,6 +52,7 @@
     Pids clientPids;
     std::vector<std::string> clientCmdlines;
     TableEntrySource source;
+    Architecture arch;
 
     static bool sortByInterfaceName(const TableEntry &a, const TableEntry &b) {
         return a.interfaceName < b.interfaceName;
@@ -61,7 +70,8 @@
     ENABLE_TRANSPORT      = 1 << 1,
     ENABLE_SERVER_PID     = 1 << 2,
     ENABLE_SERVER_ADDR    = 1 << 3,
-    ENABLE_CLIENT_PIDS    = 1 << 4
+    ENABLE_CLIENT_PIDS    = 1 << 4,
+    ENABLE_ARCH           = 1 << 5
 };
 
 using TableEntrySelect = unsigned int;