[lldb] Fix 'memory write' to not allow specifying values when writing file contents
authorVenkata Ramanaiah Nalamothu <ramana.venkat83@gmail.com>
Fri, 26 Nov 2021 10:04:57 +0000 (15:34 +0530)
committerVenkata Ramanaiah Nalamothu <ramana.venkat83@gmail.com>
Fri, 26 Nov 2021 10:20:36 +0000 (15:50 +0530)
commit94038c570fbc991c03fe68793c576314c231d4ee
treee1baf35c0a1b1768753409cacc7b99741109e4b4
parentd8f3cdfed03fe73c152d7fbf509f34f4b502f384
[lldb] Fix 'memory write' to not allow specifying values when writing file contents

Currently the 'memory write' command allows specifying the values when
writing the file contents to memory but the values are actually ignored. This
patch fixes that by erroring out when values are specified in such cases.

Reviewed By: DavidSpickett

Differential Revision: https://reviews.llvm.org/D114544
lldb/source/Commands/CommandObjectMemory.cpp
lldb/source/Interpreter/CommandObject.cpp
lldb/test/API/commands/memory/write/Makefile [new file with mode: 0644]
lldb/test/API/commands/memory/write/TestMemoryWrite.py [new file with mode: 0644]
lldb/test/API/commands/memory/write/file.txt [new file with mode: 0644]
lldb/test/API/commands/memory/write/main.c [new file with mode: 0644]