[Lldb-commits] [lldb] r349282 - Update the vFile:open: description to note that the flags

Jason Molenda via lldb-commits lldb-commits at lists.llvm.org
Sat Dec 15 10:40:38 PST 2018


Author: jmolenda
Date: Sat Dec 15 10:40:38 2018
New Revision: 349282

URL: http://llvm.org/viewvc/llvm-project?rev=349282&view=rev
Log:
Update the vFile:open: description to note that the flags
in the packet are lldb enum values, not the open(2) oflags -- 
forgot about that wrinkle.  Also added a comment to File.h 
noting that the existing values cannot be modified or we'll
have a compatibilty break with any alternative platform
implementations, or older versions of lldb-server.

Modified:
    lldb/trunk/docs/lldb-platform-packets.txt
    lldb/trunk/include/lldb/Host/File.h

Modified: lldb/trunk/docs/lldb-platform-packets.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/docs/lldb-platform-packets.txt?rev=349282&r1=349281&r2=349282&view=diff
==============================================================================
--- lldb/trunk/docs/lldb-platform-packets.txt (original)
+++ lldb/trunk/docs/lldb-platform-packets.txt Sat Dec 15 10:40:38 2018
@@ -303,7 +303,9 @@ for the lldb testsuite to be run on a re
 //
 //  request packet has the fields:
 //     1. ASCII hex encoded filename
-//     2. oflags to be passed to open(2), base 16
+//     2. flags passed to the open call, base 16.
+//        Note that these are not the oflags that open(2) takes, but
+//        are the constant values in enum OpenOptions from lldb's File.h
 //     3. mode bits, base 16
 //  
 //  response is F followed by the opened file descriptor in base 10.

Modified: lldb/trunk/include/lldb/Host/File.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/File.h?rev=349282&r1=349281&r2=349282&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Host/File.h (original)
+++ lldb/trunk/include/lldb/Host/File.h Sat Dec 15 10:40:38 2018
@@ -33,6 +33,8 @@ public:
   static int kInvalidDescriptor;
   static FILE *kInvalidStream;
 
+  // NB this enum is used in the lldb platform gdb-remote packet
+  // vFile:open: and existing values cannot be modified.
   enum OpenOptions {
     eOpenOptionRead = (1u << 0),  // Open file for reading
     eOpenOptionWrite = (1u << 1), // Open file for writing




More information about the lldb-commits mailing list