gdbserver: return tracked register status in regcache_raw_read_unsigned

In regcache_raw_read_unsigned, we unconditionally return REG_VALID as
the register status.  This does not seem right, since the register may
in fact be in another state, such as REG_UNAVAILABLE.  Return the
tracked status.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
This commit is contained in:
Tankut Baris Aktemur 2024-12-17 08:48:04 +01:00
parent ac965d0fc5
commit 975318ed49

View File

@ -474,7 +474,7 @@ regcache_raw_read_unsigned (reg_buffer_common *reg_buf, int regnum,
*val = 0;
collect_register (regcache, regnum, val);
return REG_VALID;
return regcache->get_register_status (regnum);
}
#ifndef IN_PROCESS_AGENT