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 Change the ABI class to have a weak pointer to its Process; 2017-06-29 02:57:03 +00:00
CMakeLists.txt Delete some more dead includes. 2017-03-22 23:33:16 +00:00
CPPLanguageRuntime.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
ExecutionContext.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
FileAction.cpp Move classes from Core -> Utility. 2017-02-02 21:39:50 +00:00
InstrumentationRuntime.cpp Move classes from Core -> Utility. 2017-02-02 21:39:50 +00:00
InstrumentationRuntimeStopInfo.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
JITLoader.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
JITLoaderList.cpp [lldb] Fix typos in file headers 2016-11-26 05:23:44 +00:00
Language.cpp Rename Error -> Status. 2017-05-12 04:51:55 +00:00
LanguageRuntime.cpp Rename Error -> Status. 2017-05-12 04:51:55 +00:00
Memory.cpp Rename Error -> Status. 2017-05-12 04:51:55 +00:00
MemoryHistory.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
ModuleCache.cpp Rename Error -> Status. 2017-05-12 04:51:55 +00:00
ObjCLanguageRuntime.cpp Replace HashStringUsingDJB with llvm::djbHash 2018-02-23 17:49:26 +00:00
OperatingSystem.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
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 *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
QueueItem.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
QueueList.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
RegisterContext.cpp [Target] Remove commented out code. Found by inspection. NFCI. 2017-12-07 17:05:56 +00:00
RegisterNumber.cpp Remove dependencies from Utility to Core and Target. 2017-02-14 19:06:07 +00:00
SectionLoadHistory.cpp Move classes from Core -> Utility. 2017-02-02 21:39:50 +00:00
SectionLoadList.cpp Fix backtrace of noreturn functions situated at the end of a module 2017-06-08 13:26:35 +00:00
StackFrame.cpp Remove the DWARFExpression -> Clang ExpressionParser dependency 2017-08-16 11:45:10 +00:00
StackFrameList.cpp Introduce new command: thread backtrace unique 2017-06-12 16:25:24 +00:00
StackID.cpp Move classes from Core -> Utility. 2017-02-02 21:39:50 +00:00
StopInfo.cpp Add target.process.stop-on-exec setting, and obey it. 2017-12-05 02:50:45 +00:00
StructuredDataPlugin.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
SystemRuntime.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
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 *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
ThreadList.cpp Move Log from Core -> Utility. 2017-03-03 20:56:28 +00:00
ThreadPlan.cpp Move Log from Core -> Utility. 2017-03-03 20:56:28 +00:00
ThreadPlanBase.cpp Move Log from Core -> Utility. 2017-03-03 20:56:28 +00:00
ThreadPlanCallFunction.cpp Rename Error -> Status. 2017-05-12 04:51:55 +00:00
ThreadPlanCallFunctionUsingABI.cpp Move Log from Core -> Utility. 2017-03-03 20:56:28 +00:00
ThreadPlanCallOnFunctionExit.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
ThreadPlanCallUserExpression.cpp Add DidStartExecuting/WillFinishExecuting methods to Expression. 2017-05-05 22:42:13 +00:00
ThreadPlanPython.cpp Move Log from Core -> Utility. 2017-03-03 20:56:28 +00:00
ThreadPlanRunToAddress.cpp Move Log from Core -> Utility. 2017-03-03 20:56:28 +00:00
ThreadPlanShouldStopHere.cpp Move Log from Core -> Utility. 2017-03-03 20:56:28 +00:00
ThreadPlanStepInRange.cpp Re-add change for https://reviews.llvm.org/D42582 with added directories. 2018-03-12 21:17:04 +00:00
ThreadPlanStepInstruction.cpp Move Log from Core -> Utility. 2017-03-03 20:56:28 +00:00
ThreadPlanStepOut.cpp Move Log from Core -> Utility. 2017-03-03 20:56:28 +00:00
ThreadPlanStepOverBreakpoint.cpp Move Log from Core -> Utility. 2017-03-03 20:56:28 +00:00
ThreadPlanStepOverRange.cpp Move Log from Core -> Utility. 2017-03-03 20:56:28 +00:00
ThreadPlanStepRange.cpp Move Log from Core -> Utility. 2017-03-03 20:56:28 +00:00
ThreadPlanStepThrough.cpp Move Log from Core -> Utility. 2017-03-03 20:56:28 +00:00
ThreadPlanStepUntil.cpp iwyu fixes for lldbCore. 2017-04-06 21:28:29 +00:00
ThreadPlanTracer.cpp Move ArchSpec to the Utility module 2017-11-13 16:16:33 +00:00
ThreadSpec.cpp Move StructuredData from Core to Utility 2017-06-27 10:45:31 +00:00
UnixSignals.cpp Move ArchSpec to the Utility module 2017-11-13 16:16:33 +00:00
UnwindAssembly.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00