Change type of reg_buffer::m_register_status to register_status
authorSimon Marchi <simon.marchi@ericsson.com>
Sun, 10 Jun 2018 02:08:06 +0000 (22:08 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Sun, 10 Jun 2018 02:08:06 +0000 (22:08 -0400)
commitaac0d564cea04b1c5f386e8cea924ca59057e8b4
tree04405413fbf3a558b6c965ada5a7771dd2acc9cd
parent09897e3330d41699b6146f9b8767734f92587dcc
Change type of reg_buffer::m_register_status to register_status

The type of reg_buffer::m_register_status is an array of signed char,
probably to ensure that each element takes up only one byte.  Instead,
since we use C++11, we can force the underlying type of register_status
to be signed char and use the enum type.

gdb/ChangeLog:

* common/common-regcache.h (enum register_status): Add
underlying type "signed char".
* regcache.h (reg_buffer) <m_register_status>: Change type to
register_status *.
* regcache.c (reg_buffer::reg_buffer): Alocate arrays of
register_status instead of signed char.
(reg_buffer::save): Use REG_UNKNOWN instead of 0.
(reg_buffer::get_register_status): Remove cast.
(readable_regcache::raw_read): Remove cast.
(readable_regcache::cooked_read): Remove cast.
gdb/ChangeLog
gdb/common/common-regcache.h
gdb/regcache.c
gdb/regcache.h