aboutsummaryrefslogtreecommitdiff
path: root/gdb/infcmd.c
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2018-02-21 11:20:03 +0000
committerYao Qi <yao.qi@linaro.org>2018-02-21 11:20:03 +0000
commitf3384e664de76c4bb9f8fd9920afcec86557f1f0 (patch)
treef7cf6fb743e29091c8d8e61e16bfd71723e1abf7 /gdb/infcmd.c
parentc8ec2f334c3751c28d5f952d07dea9c0558ca0a0 (diff)
downloadgdb-f3384e664de76c4bb9f8fd9920afcec86557f1f0.zip
gdb-f3384e664de76c4bb9f8fd9920afcec86557f1f0.tar.gz
gdb-f3384e664de76c4bb9f8fd9920afcec86557f1f0.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: 2018-02-21 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 'gdb/infcmd.c')
0 files changed, 0 insertions, 0 deletions