[Lldb-commits] [PATCH] D68293: [android/process list] support showing process arguments

walter erquinigo via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Oct 15 11:26:41 PDT 2019


wallace marked 2 inline comments as done.
wallace added inline comments.


================
Comment at: lldb/docs/lldb-gdb-remote.txt:1456
+//                          separated by the character '-', where each argument is
+//                          hex-encoded.
 //
----------------
labath wrote:
> Does that include argv[0]? I take it does, but argv[0] is funny, so it's better to be explicit about that.
Ohh, I've just read this in ProcessInfo.h

 // argv[0] if supported. If empty, then use m_executable.
  // Not all process plug-ins support specifying an argv[0] that differs from
  // the resolved platform executable (which is in m_executable)
  Args m_arguments; // All program arguments except argv[0


I think I have to make some adjustments


================
Comment at: lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestPlatformClient.py:63-66
+            self.assertRaises(
+                Exception,
+                lambda : self.expect("platform process list -xv", substrs=["/system/bin/ls"])
+            )
----------------
labath wrote:
> Is this a negative check? We usually use `expect(..., error=True)` for that
It's a negative test, but error=True checks for the success of the command itself, it doesn't check the substrs.
I took at look at the base classes for testing and it seems I could add something like not_contain_substrs, but the code seems very fragile


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D68293





More information about the lldb-commits mailing list