llvm-project/lldb/source/Expression
Michał Górny 14735cab65 [lldb] [gdb-remote] Add eOpenOptionReadWrite for future gdb compat
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.

Differential Revision: https://reviews.llvm.org/D106984
2021-08-09 12:06:59 +02:00
..
CMakeLists.txt [CMake] Make `intrinsics_gen` dependency unconditional. 2020-07-17 16:43:17 -07:00
DWARFExpression.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
DiagnosticManager.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
Expression.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
ExpressionVariable.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
FunctionCaller.cpp [lldb] Support debugging utility functions 2021-02-24 11:36:01 -08:00
IRExecutionUnit.cpp [lldb] Refactor IRExecutionUnit::FindInSymbols (NFC) 2021-08-05 10:18:14 -07:00
IRInterpreter.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
IRMemoryMap.cpp Target::ReadMemory read from read-only binary file Section, not memory 2021-04-16 16:13:07 -07:00
LLVMUserExpression.cpp [lldb] Lower GetRealStopInfo into ThreadPlanCallFunction (NFC) 2021-02-15 17:59:24 -08:00
Materializer.cpp Improve materializer error messages to include type names. 2021-06-11 17:59:00 -07:00
REPL.cpp [lldb] [gdb-remote] Add eOpenOptionReadWrite for future gdb compat 2021-08-09 12:06:59 +02:00
UserExpression.cpp [lldb] Get rid of HAVE_SYS_TYPES_H 2021-08-03 22:14:56 +02:00
UtilityFunction.cpp [lldb] Get rid of HAVE_SYS_TYPES_H 2021-08-03 22:14:56 +02:00