[Lldb-commits] [PATCH] D107809: [lldb] Add new commands and tests for getting file perms & exists

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 7 03:58:33 PDT 2021


labath added a comment.

I was thinking this would be more useful in the SB form (and indeed we have SBPlatform::GetFilePermissions) already, though I suppose making it available through the command line does not hurt either..



================
Comment at: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp:661-664
+    if (mode != llvm::sys::fs::perms_not_known)
+      response.Printf("F%x", mode);
+    else
+      response.Printf("F-1,%x", (int)Status(ec).GetError());
----------------
Unless I'm mistaken, the test does not actually run this code (as it tests the client bits).


================
Comment at: lldb/test/API/functionalities/gdb_remote_client/TestGDBRemotePlatformFile.py:142-150
+
+        self.server.responder = Responder()
+
+        try:
+            self.runCmd("platform select remote-gdb-server")
+            self.runCmd("platform connect connect://" +
+                        self.server.get_connect_address())
----------------
Maybe it's time to create a separate test class which would perform this in the setUp/tearDown methods?


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

https://reviews.llvm.org/D107809



More information about the lldb-commits mailing list