GDBserver remote packet support for memory tagging
authorLuis Machado <luis.machado@linaro.org>
Mon, 15 Jun 2020 18:34:06 +0000 (15:34 -0300)
committerLuis Machado <luis.machado@linaro.org>
Wed, 24 Mar 2021 17:49:21 +0000 (14:49 -0300)
commit546b77fe78bb366bbec3c708ac371e2f553bbdae
tree83e9a4964c5abe2fce9a3f17de88e257b1533886
parent754487e200deb9fad3399556e838bb68eedbab18
GDBserver remote packet support for memory tagging

This patch adds the generic remote bits to gdbserver so it can check for memory
tagging support and handle fetch tags and store tags requests.

gdbserver/ChangeLog:

2021-03-24  Luis Machado  <luis.machado@linaro.org>

* remote-utils.cc (decode_m_packet_params): Renamed from ...
(decode_m_packet): ... this, which now calls decode_m_packet_params.
Make char * param/return const char *.
(decode_M_packet): Use decode_m_packet_params and make char * param
const char *.
* remote-utils.h (decode_m_packet_params): New prototype.
(decode_m_packet): Constify char pointers.
(decode_M_packet): Likewise.
* server.cc (create_fetch_memtags_reply)
(parse_store_memtags_request): New
functions.
(handle_general_set): Handle the QMemTags packet.
(parse_fetch_memtags_request): New function.
(handle_query): Handle the qMemTags packet and advertise memory
tagging support.
(captured_main): Initialize memory tagging flag.
* server.h (struct client_state): Initialize memory tagging flag.
* target.cc (process_stratum_target::supports_memory_tagging)
(process_stratum_target::fetch_memtags)
(process_stratum_target::store_memtags): New methods.
* target.h: Include gdbsupport/byte-vector.h.
(class process_stratum_target) <supports_memory_tagging>
<fetch_memtags, store_memtags>: New class virtual methods.
(target_supports_memory_tagging): Define.
gdbserver/ChangeLog
gdbserver/remote-utils.cc
gdbserver/remote-utils.h
gdbserver/server.cc
gdbserver/server.h
gdbserver/target.cc
gdbserver/target.h