[Lldb-commits] [PATCH] D105181: [lldb][AArch64] Add memory tag writing to lldb
David Spickett via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Jun 30 03:51:13 PDT 2021
DavidSpickett created this revision.
Herald added subscribers: danielkiss, kristof.beyls.
DavidSpickett requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
This adds memory tag writing to Process and the
GDB remote code. Supporting work for the
"memory tag write" command. (to follow)
This command will sometimes only know the start
address and number of tags so a new way to get
the tag manager has been added.
GetMemoryTagManagerForGranules will work out
the range from a start address and some number
of granules.
The alignment behaviour of this method is different
from the existing method. In the case where start is
misaligned, we first align it down then add granules.
As opposed to adding granules first which would result
in an extra granule after alignment.
(this makes more sense for a situation like we
will have in the tag write command)
To save the commands then redoing that alignment
both memory tag manager methods now return a struct
of the range we checked and the manager itself.
(ReadMemoryTags and WriteMemoryTags now also use this
type instead of seperate range arguments)
Process WriteMemoryTags is similair to ReadMemoryTags.
It will pack the tags then call DoWriteMemoryTags.
That function will send the QMemTags packet to the gdb-remote.
The QMemTags packet follows the GDB specification in:
https://sourceware.org/gdb/current/onlinedocs/gdb/General-Query-Packets.html#General-Query-Packets
Note that lldb-server will be treating partial writes as
complete failures. So lldb doesn't need to handle the partial
write case in any special way.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D105181
Files:
lldb/include/lldb/Target/MemoryTagManager.h
lldb/include/lldb/Target/Process.h
lldb/source/Commands/CommandObjectMemoryTag.cpp
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
lldb/source/Target/Process.cpp
lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105181.355500.patch
Type: text/x-patch
Size: 22300 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210630/067492b0/attachment-0001.bin>
More information about the lldb-commits
mailing list