[Lldb-commits] [PATCH] D106984: [lldb] [gdb-remote] Add eOpenOptionReadWrite for future gdb compat
Michał Górny via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Jul 28 12:36:26 PDT 2021
mgorny created this revision.
mgorny added reviewers: labath, emaste, krytarowski, jasonmolenda, clayborg, JDevlieghere.
mgorny requested review of this revision.
Modify OpenOptions enum to open the future path into synchronizing
vFile:open bits with GDB. Currently, LLDB and GDB use different flag
models effectively making it impossible to match bits. Notably, LLDB
uses two bits to indicate read and write status, and uses union of both
for read/write. GDB uses a value of 0 for read-only, 1 for write-only
and 2 for read/write.
In order to future-proof the code for the GDB variant:
1. Add a distinct eOpenOptionReadWrite constant to be used instead of (eOpenOptionRead | eOpenOptionWrite) when R/W access is required.
2. Rename eOpenOptionRead and eOpenOptionWrite to eOpenOptionReadOnly and eOpenOptionWriteOnly respectively, to make it clear that they do not mean to be combined and require update to all call sites.
3. Use the intersection of all three flags when matching against the three possible values.
This commit does not change the actual bits used by LLDB.
https://reviews.llvm.org/D106984
Files:
lldb/docs/lldb-platform-packets.txt
lldb/include/lldb/Host/File.h
lldb/source/API/SBStream.cpp
lldb/source/Commands/CommandObjectMemory.cpp
lldb/source/Commands/CommandObjectPlatform.cpp
lldb/source/Commands/CommandObjectSettings.cpp
lldb/source/Commands/CommandObjectTarget.cpp
lldb/source/Core/Debugger.cpp
lldb/source/Core/StreamFile.cpp
lldb/source/Expression/REPL.cpp
lldb/source/Host/common/File.cpp
lldb/source/Host/common/FileSystem.cpp
lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp
lldb/source/Host/windows/Host.cpp
lldb/source/Interpreter/CommandInterpreter.cpp
lldb/source/Interpreter/ScriptInterpreter.cpp
lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp
lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
lldb/source/Target/ModuleCache.cpp
lldb/source/Target/Platform.cpp
lldb/source/Target/Process.cpp
lldb/source/Target/Target.cpp
lldb/unittests/Host/FileSystemTest.cpp
lldb/unittests/Host/FileTest.cpp
lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106984.362493.patch
Type: text/x-patch
Size: 29462 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210728/c7488164/attachment-0001.bin>
More information about the lldb-commits
mailing list