Philippe Mathieu-Daudé <[email protected]> writes:
>>From "monitor/hmp-target.h", only the MonitorDef structure
> is target specific (by using the 'target_long' type). All
> the rest (even target_monitor_defs and target_get_monitor_def)
> can be exposed to target-agnostic units, allowing to build
> some of them in meson common source set.
>
> Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
target_long is only used as return type of MonitorDef method
get_value(). Its only caller is
int get_monitor_def(Monitor *mon, int64_t *pval, const char *name)
{
[...]
for(; md->name != NULL; md++) {
if (hmp_compare_cmd(name, md->name)) {
if (md->get_value) {
---> *pval = md->get_value(mon, md, md->offset);
} else {
We store the return value in an int64_t.
Change the return type to match?