mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-23 10:03:47 +08:00
sim: ppc: return register error when unhandled
We don't want to fallthru and use cooked_buf when we haven't initialized it to anything. Returning 0 indicates the register wasn't recognized.
This commit is contained in:
parent
c3c79ac5c4
commit
20617191e4
@ -889,8 +889,7 @@ psim_read_register(psim *system,
|
||||
default:
|
||||
printf_filtered("psim_read_register(processor=%p,buf=%p,reg=%s) %s\n",
|
||||
processor, buf, reg, "read of this register unimplemented");
|
||||
break;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* the PSIM internal values are in host order. To fetch raw data,
|
||||
@ -1077,8 +1076,7 @@ psim_write_register(psim *system,
|
||||
printf_filtered("psim_write_register(processor=%p,cooked_buf=%p,reg=%s) %s\n",
|
||||
processor, cooked_buf, reg,
|
||||
"read of this register unimplemented");
|
||||
break;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
return description.size;
|
||||
|
Loading…
Reference in New Issue
Block a user