diff options
author | Simon Marchi <simon.marchi@ericsson.com> | 2018-06-09 22:08:06 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2018-06-09 22:08:06 -0400 |
commit | aac0d564cea04b1c5f386e8cea924ca59057e8b4 (patch) | |
tree | 04405413fbf3a558b6c965ada5a7771dd2acc9cd /gdb/common | |
parent | 09897e3330d41699b6146f9b8767734f92587dcc (diff) | |
download | binutils-aac0d564cea04b1c5f386e8cea924ca59057e8b4.zip binutils-aac0d564cea04b1c5f386e8cea924ca59057e8b4.tar.gz binutils-aac0d564cea04b1c5f386e8cea924ca59057e8b4.tar.bz2 |
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.
Diffstat (limited to 'gdb/common')
-rw-r--r-- | gdb/common/common-regcache.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/common/common-regcache.h b/gdb/common/common-regcache.h index 696ba00..9709ba4 100644 --- a/gdb/common/common-regcache.h +++ b/gdb/common/common-regcache.h @@ -22,7 +22,7 @@ /* This header is a stopgap until we have an independent regcache. */ -enum register_status +enum register_status : signed char { /* The register value is not in the cache, and we don't know yet whether it's available in the target (or traceframe). */ |