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.
llvm-svn: 349282
//
// 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.
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