[all-commits] [llvm/llvm-project] c69307: [lldb] Prevent object file plugins from changing t...
Jonas Devlieghere via All-commits
all-commits at lists.llvm.org
Mon Apr 4 09:24:38 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c69307e5eeb585203a68b24f020d17ad75821c8a
https://github.com/llvm/llvm-project/commit/c69307e5eeb585203a68b24f020d17ad75821c8a
Author: Jonas Devlieghere <jonas at devlieghere.com>
Date: 2022-04-04 (Mon, 04 Apr 2022)
Changed paths:
M lldb/include/lldb/lldb-private-interfaces.h
M lldb/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.cpp
M lldb/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.h
M lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
M lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h
M lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp
M lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.h
M lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
M lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h
M lldb/source/Plugins/ObjectFile/Minidump/ObjectFileMinidump.cpp
M lldb/source/Plugins/ObjectFile/Minidump/ObjectFileMinidump.h
M lldb/source/Plugins/ObjectFile/PDB/ObjectFilePDB.cpp
M lldb/source/Plugins/ObjectFile/PDB/ObjectFilePDB.h
M lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
M lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h
M lldb/source/Plugins/ObjectFile/wasm/ObjectFileWasm.cpp
M lldb/source/Plugins/ObjectFile/wasm/ObjectFileWasm.h
Log Message:
-----------
[lldb] Prevent object file plugins from changing the data buffer
The current design allows that the object file contents could be mapped
by one object file plugin and then used by another. Presumably the idea
here was to avoid mapping the same file twice.
This becomes an issue when one object file plugin wants to map the file
differently from the others. For example, ObjectFileELF needs to map its
memory as writable while others likeObjectFileMachO needs it to be
mapped read-only.
This patch prevents plugins from changing the buffer by passing them is
by value rather than by reference.
Differential revision: https://reviews.llvm.org/D122944
More information about the All-commits
mailing list