]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdbserver: use inheritance more to define tracepoint contexts
authorTankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Wed, 29 Jan 2025 09:50:30 +0000 (10:50 +0100)
committerTankut Baris Aktemur <tankut.baris.aktemur@intel.com>
Wed, 29 Jan 2025 10:17:33 +0000 (11:17 +0100)
commit072208e719f9e024408be3a97595bcbdbaf6395c
treee54223d4c1734a20d788f0509710f8bb10eeacfe
parent77bbe102f4f180dff6b97a1dab7dc0e98f42b8f7
gdbserver: use inheritance more to define tracepoint contexts

This is a continuation of the previous refactoring to use inheritance
in the definition of tracepoints contexts.  Again, no behavioral change
is intended.

Different tracepoint contexts are identified by the `type` field.  The
field is used only in `get_context_regcache`, where we essentially
have 2 cases, each corresponding to a tracepoint context type.  Remove
the `type` field and split the `get_context_regcache` function into 2
virtual method implementations.

Tested by rebuilding gdbserver with '--enable-inprocess-agent=no' and
'--enable-inprocess-agent=yes'.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
gdbserver/tracepoint.cc