diff options
author | Yao Qi <yao.qi@linaro.org> | 2017-11-28 17:52:12 +0000 |
---|---|---|
committer | Yao Qi <yao.qi@linaro.org> | 2018-01-22 11:21:18 +0000 |
commit | 7e58b2bb292bf40bec07f50e52d8447e6c983654 (patch) | |
tree | 1aaffb8076f6049acf47762922b5ecad17db28ff /.gitattributes | |
parent | fd57b1a23bbf3a8ebd8491935a4f36e1c1f2325d (diff) | |
download | gdb-7e58b2bb292bf40bec07f50e52d8447e6c983654.zip gdb-7e58b2bb292bf40bec07f50e52d8447e6c983654.tar.gz gdb-7e58b2bb292bf40bec07f50e52d8447e6c983654.tar.bz2 |
Replace regcache::dump with class register_dump
Nowadays, we need to dump registers contents from "readwrite" regcache and
"readonly" regcache,
if (target_has_registers)
get_current_regcache ()->dump (out, what_to_dump);
else
{
/* For the benefit of "maint print registers" & co when
debugging an executable, allow dumping a regcache even when
there is no thread selected / no registers. */
regcache dummy_regs (target_gdbarch ());
dummy_regs.dump (out, what_to_dump);
}
since we'll have two different types/classes for "readwrite" regcache and
"readonly" regcache, we have to move dump method to their parent class,
reg_buffer. However, the functionality of "dump" looks unnecessary to
reg_buffer (because some dump modes like regcache_dump_none,
regcache_dump_remote and regcache_dump_groups don't need reg_buffer at
all, they need gdbarch to do the dump), so I decide to move "dump" into a
separate classes, and each sub-class is about each mode of dump.
gdb:
2017-11-28 Yao Qi <yao.qi@linaro.org>
* regcache.c (class register_dump): New class.
(register_dump_regcache, register_dump_none): New class.
(register_dump_remote, register_dump_groups): New class.
(regcache_print): Update.
* regcache.h (regcache_dump_what): Move it to regcache.c.
(regcache) <dump>: Remove.
Diffstat (limited to '.gitattributes')
0 files changed, 0 insertions, 0 deletions