llvm-project/lldb/source/Target
Pavel Labath 16064d354a Re-land: [lldb] Use vFlash commands when writing to target's flash memory regions
The difference between this and the previous patch is that now we use
ELF physical addresses only for loading objects into the target (and the
rest of the module load address logic still uses virtual addresses).

Summary:
When writing an object file over gdb-remote, use the vFlashErase, vFlashWrite, and vFlashDone commands if the write address is in a flash memory region.  A bare metal target may have this kind of setup.

- Update ObjectFileELF to set load addresses using physical addresses.  A typical case may be a data section with a physical address in ROM and a virtual address in RAM, which should be loaded to the ROM address.
- Add support for querying the target's qXfer:memory-map, which contains information about flash memory regions, leveraging MemoryRegionInfo data structures with minor modifications
- Update ProcessGDBRemote to use vFlash commands in DoWriteMemory when the target address is in a flash region

Original discussion at http://lists.llvm.org/pipermail/lldb-dev/2018-January/013093.html

Reviewers: clayborg, labath

Reviewed By: labath

Subscribers: llvm-commits, arichardson, emaste, mgorny, lldb-commits

Differential Revision: https://reviews.llvm.org/D42145
Patch by Owen Shaw <llvm@owenpshaw.net>.

llvm-svn: 327970
2018-03-20 11:56:24 +00:00
..
ABI.cpp
CMakeLists.txt
CPPLanguageRuntime.cpp
ExecutionContext.cpp
FileAction.cpp
InstrumentationRuntime.cpp
InstrumentationRuntimeStopInfo.cpp
JITLoader.cpp
JITLoaderList.cpp
Language.cpp
LanguageRuntime.cpp
Memory.cpp
MemoryHistory.cpp
ModuleCache.cpp
ObjCLanguageRuntime.cpp Replace HashStringUsingDJB with llvm::djbHash 2018-02-23 17:49:26 +00:00
OperatingSystem.cpp
PathMappingList.cpp Fix some warnings found by ToT clang 2017-11-02 21:35:26 +00:00
Platform.cpp Add Utility/Environment class for handling... environments 2018-01-10 11:57:31 +00:00
Process.cpp Re-land: [lldb] Use vFlash commands when writing to target's flash memory regions 2018-03-20 11:56:24 +00:00
ProcessInfo.cpp Add Utility/Environment class for handling... environments 2018-01-10 11:57:31 +00:00
ProcessLaunchInfo.cpp Move PseudoTerminal to the lldb_private namespace 2017-12-11 10:09:14 +00:00
Queue.cpp
QueueItem.cpp
QueueList.cpp
RegisterContext.cpp [Target] Remove commented out code. Found by inspection. NFCI. 2017-12-07 17:05:56 +00:00
RegisterNumber.cpp
SectionLoadHistory.cpp
SectionLoadList.cpp
StackFrame.cpp Remove the DWARFExpression -> Clang ExpressionParser dependency 2017-08-16 11:45:10 +00:00
StackFrameList.cpp
StackID.cpp
StopInfo.cpp Add target.process.stop-on-exec setting, and obey it. 2017-12-05 02:50:45 +00:00
StructuredDataPlugin.cpp
SystemRuntime.cpp
Target.cpp Fix a bug in "target.source-map" where we would resolve unmapped paths incorrectly 2018-03-15 05:13:15 +00:00
TargetList.cpp Move Timer and TraceOptions from Core to Utility 2017-06-29 14:32:17 +00:00
Thread.cpp Move StopInfoOverride callback to the new architecture plugin 2017-10-25 21:05:31 +00:00
ThreadCollection.cpp
ThreadList.cpp
ThreadPlan.cpp
ThreadPlanBase.cpp
ThreadPlanCallFunction.cpp
ThreadPlanCallFunctionUsingABI.cpp
ThreadPlanCallOnFunctionExit.cpp
ThreadPlanCallUserExpression.cpp
ThreadPlanPython.cpp
ThreadPlanRunToAddress.cpp
ThreadPlanShouldStopHere.cpp
ThreadPlanStepInRange.cpp Re-add change for https://reviews.llvm.org/D42582 with added directories. 2018-03-12 21:17:04 +00:00
ThreadPlanStepInstruction.cpp
ThreadPlanStepOut.cpp
ThreadPlanStepOverBreakpoint.cpp
ThreadPlanStepOverRange.cpp
ThreadPlanStepRange.cpp
ThreadPlanStepThrough.cpp
ThreadPlanStepUntil.cpp
ThreadPlanTracer.cpp Move ArchSpec to the Utility module 2017-11-13 16:16:33 +00:00
ThreadSpec.cpp
UnixSignals.cpp Move ArchSpec to the Utility module 2017-11-13 16:16:33 +00:00
UnwindAssembly.cpp