aboutsummaryrefslogtreecommitdiff
path: root/gdb/source.c
diff options
context:
space:
mode:
authorTankut Baris Aktemur <tankut.baris.aktemur@intel.com>2025-01-29 10:50:31 +0100
committerTankut Baris Aktemur <tankut.baris.aktemur@intel.com>2025-01-29 11:17:34 +0100
commitb5a42cbfd9643c3c418efc553dd84a9293e0336e (patch)
tree97750d4a02aac4a15102a1c8444bd1813f887e79 /gdb/source.c
parent41ef481066787b9c72eda27810959f18ddd84f93 (diff)
downloadbinutils-b5a42cbfd9643c3c418efc553dd84a9293e0336e.zip
binutils-b5a42cbfd9643c3c418efc553dd84a9293e0336e.tar.gz
binutils-b5a42cbfd9643c3c418efc553dd84a9293e0336e.tar.bz2
gdbserver: use REG_UNKNOWN for a regcache's register statuses
When a regcache is initialized, the values of registers are not fetched yet. Thus, initialize the register statuses to REG_UNKNOWN instead of REG_UNAVAILABLE, because the latter rather means "we attempted to fetch but could not obtain the value". The definitions of the reg status enums (from gdbsupport/common-regcache.h) as a reminder: /* The register value is not in the cache, and we don't know yet whether it's available in the target (or traceframe). */ REG_UNKNOWN = 0, /* The register value is valid and cached. */ REG_VALID = 1, /* The register value is unavailable. E.g., we're inspecting a traceframe, and this register wasn't collected. Note that this "unavailable" is different from saying the register does not exist in the target's architecture --- in that case, the target should have given us a target description that does not include the register in the first place. */ REG_UNAVAILABLE = -1 Similarly, when the regcache is invalidated, change all the statuses back to REG_UNKNOWN. Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/source.c')
0 files changed, 0 insertions, 0 deletions