[Lldb-commits] [PATCH] D68291: [process list] make the TRIPLE column wider

walter erquinigo via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Oct 2 15:38:53 PDT 2019


wallace updated this revision to Diff 222921.
wallace added a comment.
Herald added a subscriber: srhines.

updated the unit test


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68291/new/

https://reviews.llvm.org/D68291

Files:
  lldb/source/Utility/ProcessInfo.cpp
  lldb/unittests/Utility/ProcessInstanceInfoTest.cpp


Index: lldb/unittests/Utility/ProcessInstanceInfoTest.cpp
===================================================================
--- lldb/unittests/Utility/ProcessInstanceInfoTest.cpp
+++ lldb/unittests/Utility/ProcessInstanceInfoTest.cpp
@@ -67,15 +67,15 @@
   ProcessInstanceInfo::DumpTableHeader(s, show_args, verbose);
   info.DumpAsTableRow(s, resolver, show_args, verbose);
   EXPECT_STREQ(
-      R"(PID    PARENT USER       GROUP      EFF USER   EFF GROUP  TRIPLE                   ARGUMENTS
-====== ====== ========== ========== ========== ========== ======================== ============================
-47     0      user1      group3     2          4          x86_64-pc-linux          
+      R"(PID    PARENT USER       GROUP      EFF USER   EFF GROUP  TRIPLE                         ARGUMENTS
+====== ====== ========== ========== ========== ========== ============================== ============================
+47     0      user1      group3     2          4          x86_64-pc-linux                
 )",
       s.GetData());
 }
 
 TEST(ProcessInstanceInfo, DumpTable_invalidUID) {
-  ProcessInstanceInfo info("a.out", ArchSpec("x86_64-pc-linux"), 47);
+  ProcessInstanceInfo info("a.out", ArchSpec("aarch64-unknown-linux-android"), 47);
 
   DummyUserIDResolver resolver;
   StreamString s;
@@ -85,9 +85,9 @@
   ProcessInstanceInfo::DumpTableHeader(s, show_args, verbose);
   info.DumpAsTableRow(s, resolver, show_args, verbose);
   EXPECT_STREQ(
-      R"(PID    PARENT USER       TRIPLE                   NAME
-====== ====== ========== ======================== ============================
-47     0                 x86_64-pc-linux          a.out
+      R"(PID    PARENT USER       TRIPLE                         NAME
+====== ====== ========== ============================== ============================
+47     0                 aarch64-unknown-linux-android  a.out
 )",
       s.GetData());
 }
Index: lldb/source/Utility/ProcessInfo.cpp
===================================================================
--- lldb/source/Utility/ProcessInfo.cpp
+++ lldb/source/Utility/ProcessInfo.cpp
@@ -169,13 +169,15 @@
 
   if (verbose) {
     s.Printf("PID    PARENT USER       GROUP      EFF USER   EFF GROUP  TRIPLE "
-             "                  %s\n",
+             "                        %s\n",
              label);
-    s.PutCString("====== ====== ========== ========== ========== ========== "
-                 "======================== ============================\n");
+    s.PutCString(
+        "====== ====== ========== ========== ========== ========== "
+        "============================== ============================\n");
   } else {
-    s.Printf("PID    PARENT USER       TRIPLE                   %s\n", label);
-    s.PutCString("====== ====== ========== ======================== "
+    s.Printf("PID    PARENT USER       TRIPLE                         %s\n",
+             label);
+    s.PutCString("====== ====== ========== ============================== "
                  "============================\n");
   }
 }
@@ -216,12 +218,12 @@
             &ProcessInstanceInfo::GetEffectiveGroupID,
             &UserIDResolver::GetGroupName);
 
-      s.Printf("%-24s ", arch_strm.GetData());
+      s.Printf("%-30s ", arch_strm.GetData());
     } else {
       print(&ProcessInstanceInfo::EffectiveUserIDIsValid,
             &ProcessInstanceInfo::GetEffectiveUserID,
             &UserIDResolver::GetUserName);
-      s.Printf("%-24s ", arch_strm.GetData());
+      s.Printf("%-30s ", arch_strm.GetData());
     }
 
     if (verbose || show_args) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68291.222921.patch
Type: text/x-patch
Size: 3589 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191002/5d75eb26/attachment-0001.bin>


More information about the lldb-commits mailing list