<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">The comments in File.h say:<div class=""><br class=""></div><div class=""><div style="color: rgb(212, 212, 212); background-color: rgb(30, 30, 30); font-family: Menlo, Monaco, "Courier New", monospace; line-height: 18px; white-space: pre;" class=""><div class=""><span style="color: #6a9955;" class=""> // NB this enum is used in the lldb platform gdb-remote packet</span></div><div class=""><span style="color: #6a9955;" class=""> // vFile:open: and existing values cannot be modified.</span></div><div class=""> <span style="color: #569cd6;" class="">enum</span> <span style="color: #4ec9b0;" class="">OpenOptions</span> {</div><div class=""> <span style="color: #b5cea8;" class="">eOpenOptionRead</span> = (<span style="color: #b5cea8;" class="">1u</span> << <span style="color: #b5cea8;" class="">0</span>),<span style="color: #6a9955;" class=""> // Open file for reading</span></div><div class=""> <span style="color: #b5cea8;" class="">eOpenOptionWrite</span> = (<span style="color: #b5cea8;" class="">1u</span> << <span style="color: #b5cea8;" class="">1</span>),<span style="color: #6a9955;" class=""> // Open file for writing</span></div><div class=""> eOpenOptionAppend =</div><div class=""> (1u << 2),<span style="color: #6a9955;" class=""> // Don't truncate file when opening, append to end of file</span></div><div class=""></div></div></div><div class=""><br class=""></div><div class="">And In GDBRemoteCommunicationServerCommon.cpp it says:</div><div class=""><br class=""></div><div class=""><div style="color: rgb(212, 212, 212); background-color: rgb(30, 30, 30); font-family: Menlo, Monaco, "Courier New", monospace; line-height: 18px; white-space: pre;" class=""><div class=""> <span style="color: #569cd6;" class="">uint32_t</span> flags = <span style="color: #9cdcfe;" class="">packet</span>.<span style="color: #dcdcaa;" class="">GetHexMaxU32</span>(<span style="color: #569cd6;" class="">false</span>, <span style="color: #b5cea8;" class="">0</span>);</div><div class=""> <span style="color: #c586c0;" class="">if</span> (<span style="color: #9cdcfe;" class="">packet</span>.<span style="color: #dcdcaa;" class="">GetChar</span>() == <span style="color: #ce9178;" class="">','</span>) {</div><div class=""> <span style="color: #569cd6;" class="">mode_t</span> mode = <span style="color: #9cdcfe;" class="">packet</span>.<span style="color: #dcdcaa;" class="">GetHexMaxU32</span>(<span style="color: #569cd6;" class="">false</span>, <span style="color: #b5cea8;" class="">0600</span>);</div><div class=""> FileSpec <span style="color: #dcdcaa;" class="">path_spec</span>(path);</div><div class=""> <span style="color: #4ec9b0;" class="">FileSystem</span>::<span style="color: #dcdcaa;" class="">Instance</span>().<span style="color: #dcdcaa;" class="">Resolve</span>(path_spec);</div><div class=""><span style="color: #6a9955;" class=""> // Do not close fd.</span></div><div class=""> <span style="color: #569cd6;" class="">auto</span> file = <span style="color: #4ec9b0;" class="">FileSystem</span>::<span style="color: #dcdcaa;" class="">Instance</span>().<span style="color: #dcdcaa;" class="">Open</span>(path_spec, flags, mode, <span style="color: #569cd6;" class="">false</span>);</div><br class=""></div></div><div class=""><br class=""></div><div class="">But in the GDB documentation it says:</div><div class=""><br class=""></div><div class=""><div class=""><font face="Courier" class="">@node Open Flags</font></div><div class=""><font face="Courier" class="">@unnumberedsubsubsec Open Flags</font></div><div class=""><font face="Courier" class="">@cindex open flags, in file-i/o protocol</font></div><div class=""><font face="Courier" class=""><br class=""></font></div><div class=""><font face="Courier" class="">All values are given in hexadecimal representation.</font></div><div class=""><font face="Courier" class=""><br class=""></font></div><div class=""><font face="Courier" class="">@smallexample</font></div><div class=""><font face="Courier" class=""> O_RDONLY 0x0</font></div><div class=""><font face="Courier" class=""> O_WRONLY 0x1</font></div><div class=""><font face="Courier" class=""> O_RDWR 0x2</font></div><div class=""><font face="Courier" class=""> O_APPEND 0x8</font></div><div class=""><font face="Courier" class=""> O_CREAT 0x200</font></div><div class=""><font face="Courier" class=""> O_TRUNC 0x400</font></div><div class=""><font face="Courier" class=""> O_EXCL 0x800</font></div><div class=""><font face="Courier" class="">@end smallexample</font></div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Does vFile:Open actually work? Are there any tests that cover it?</div><div class=""><br class=""></div></body></html>