diff --git a/lldb/docs/lldb-platform-packets.txt b/lldb/docs/lldb-platform-packets.txt index ab4887941de1..6a01a81759e6 100644 --- a/lldb/docs/lldb-platform-packets.txt +++ b/lldb/docs/lldb-platform-packets.txt @@ -303,7 +303,9 @@ for the lldb testsuite to be run on a remote target device/system. // // 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. diff --git a/lldb/include/lldb/Host/File.h b/lldb/include/lldb/Host/File.h index 588e6ece1ad1..69ae2004e422 100644 --- a/lldb/include/lldb/Host/File.h +++ b/lldb/include/lldb/Host/File.h @@ -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