[PATCH v2 00/11] gdbserver: refactor regcache

Tankut Baris Aktemur
2024-12-30T10:51:21Z

Hello,

This is an attempt to refactor the regcache in gdbserver, as a
continuation of the series that was posted at

https://inbox.sourceware.org/gdb-patches/cover.1677582744.git.tankut.baris.aktemur@intel.com/

In this revision, I aim to address Simon's review comments. I did
not, however, include all the patches from v1. I think the series was
rather too long and I'd like to settle down some refactorings first.
I added a couple new patches to this aim.

Regression-tested on X86_64 Linux using the native-gdbserver and
native-extended-gdbserver board files.

---
Tankut Baris Aktemur (11):
gdbserver: dump 'xx...x' in collect_register_as_string for unavailable register
gdbserver: use inheritance to define tracepoint contexts
gdbserver: use inheritance more to define tracepoint contexts
gdbserver: convert init_register_cache and new_register_cache into constructors
gdbserver: convert free_register_cache into a destructor of regcache
gdbserver: use unique_ptr for thread_info's regcache
gdbserver: introduce and use regcache::set_register_status
gdbserver: use REG_UNKNOWN for a regcache's register statuses
gdbserver: define and use regcache::reset
gdbserver: refactor the definition and uses of supply_regblock
gdbserver: fix the declared type of register_status in regcache

gdbserver/gdbthread.h | 12 +--
gdbserver/regcache.cc | 176 ++++++++++++++++++------------------------
gdbserver/regcache.h | 35 +++++----
gdbserver/server.cc | 8 +-
gdbserver/tracepoint.cc | 199 ++++++++++++++++++++++--------------------------
5 files changed, 195 insertions(+), 235 deletions(-)
---
base-commit: 2b001c799977a97304311df238fe33daa9b8fa7f
change-id: 20241216-upstream-gdbserver-regcache-a00f13aef39e

Best regards,
--
Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>

Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Sean Fennelly, Jeffrey Schneiderman, Tiffany Doon Silva