llvm-project/lldb/source
Pavel Labath 029fb69372 [lldb] Use vFlash commands when writing to target's flash memory regions
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: arichardson, emaste, mgorny, lldb-commits

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

llvm-svn: 326261
2018-02-27 22:14:33 +00:00
..
API [LLDB] Initial version of PPC64 InstEmulation 2018-02-27 18:42:46 +00:00
Breakpoint Fix breakpoint thread name conditionals after breakpoint options refactor. 2018-02-23 21:10:42 +00:00
Commands Delete some unused #includes of CleanUp.h, NFC 2018-02-23 00:29:40 +00:00
Core [lldb][PPC64] Fixed long double variables dump 2018-01-17 15:11:20 +00:00
DataFormatters Use exact equality for category language matching, for all languages, except those specifically mentioned. 2017-06-06 20:40:24 +00:00
Expression [IRExecutionUnit] Remove broken/dead code. 2018-01-04 23:37:18 +00:00
Host [lldb] Use vFlash commands when writing to target's flash memory regions 2018-02-27 22:14:33 +00:00
Initialization Don't use llvm::EnablePrettyStackTrace on macOS. 2017-12-02 00:11:18 +00:00
Interpreter Delete some unused #includes of CleanUp.h, NFC 2018-02-23 00:29:40 +00:00
Plugins [lldb] Use vFlash commands when writing to target's flash memory regions 2018-02-27 22:14:33 +00:00
Symbol [lldb] Use vFlash commands when writing to target's flash memory regions 2018-02-27 22:14:33 +00:00
Target [lldb] Use vFlash commands when writing to target's flash memory regions 2018-02-27 22:14:33 +00:00
Utility Re-land: "[Support] Replace HashString with djbHash." 2018-02-26 15:16:42 +00:00
CMakeLists.txt Remove Plugins/Process/POSIX from include_directories 2017-04-11 12:26:25 +00:00
lldb.cpp Run clang-format on lldb.cpp 2017-11-02 16:56:52 +00:00