Add methods to gdbserver regcache and raw_compare
Add additional functions to gdbserver regcache to make it more like gdb regcache. This will allow the next patch to add a common function which uses regcache. The alternatives for the next patch would be to either duplicate the common code in both gdb and gdbserver, or alternatively pass function pointers for read register, write register, get status to the common code. In addition, add a register compare function. This will be used in the next patch. Alternatively instead of adding a new function, I could read into a buffer and then compare. 2018-05-11 Alan Hayward <alan.hayward@arm.com> gdb/ * regcache.c (regcache::raw_compare): New function. * regcache.h (regcache::raw_compare): New declaration. gdbserver/ * regcache.c (register_data): New function. (supply_register): Call member function. (regcache::raw_supply): Replacement for supply_register. (collect_register): Call member function. (regcache::raw_collect): Replacement for collect_register. (regcache::get_register_status): New function. (regcache::raw_compare): Likewise. * regcache.h: (regcache::raw_supply): New declaration. * (regcache::raw_collect): Likewise. * (regcache::raw_compare): Likewise. * (regcache::get_register_status): Likewise.
Loading
Please register or sign in to comment