This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Rename regcache_cooked_read_ftype and make a function_view
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Wed, 20 Jun 2018 14:29:38 -0400
- Subject: [binutils-gdb] Rename regcache_cooked_read_ftype and make a function_view
*** TEST RESULTS FOR COMMIT 302abd6e9facdfec3473e19ff65a5479f850ad62 ***
Author: Simon Marchi <simon.marchi@polymtl.ca>
Branch: master
Commit: 302abd6e9facdfec3473e19ff65a5479f850ad62
Rename regcache_cooked_read_ftype and make a function_view
regcache_cooked_read_ftype can be converted to a function_view, which
allows us to use lambda functions and therefore avoid having to pass an
opaque pointer parameter.
Adjusting the fallouts showed that the "const regcache &" passed to the
readonly_detached_regcache constructor is cast to non-const in
do_cooked_read. I changed the constructor parameter to be non-const.
Finally, I renamed the typedef from regcache_cooked_read_ftype to
register_read_ftype, since there is nothing that forces us to use it
only for regcaches nor cooked registers.
gdb/ChangeLog:
* regcache.h (regcache_cooked_read_ftype): Rename to...
(register_read_ftype): ...this, change type to function_view.
(class reg_buffer) <save>: Remove src parameter.
(readonly_detached_regcache) <readonly_detached_regcache>: Make
parameter non-const in first overload. Remove src parameter in
second overload.
* regcache.c (do_cooked_read): Remove.
(readonly_detached_regcache::readonly_detached_regcache): Make
parameter non-const, adjust call to other constructor.
(reg_buffer::save): Remove src parameter.
* frame.c (do_frame_register_read): Remove.
(frame_save_as_regcache): Use lambda function.
* ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
parameter to ppu2spu_data *.
(ppu2spu_sniffer): Use lambda function.
- Follow-Ups:
- Failures on Fedora-s390x-m64, branch master
- Failures on Fedora-x86_64-m64, branch master
- Failures on Debian-s390x-m64, branch master
- Failures on Fedora-i686, branch master
- Failures on Fedora-x86_64-native-gdbserver-m32, branch master
- Failures on Fedora-x86_64-m32, branch master
- Failures on Fedora-x86_64-cc-with-index, branch master
- Failures on Debian-s390x-native-extended-gdbserver-m64, branch master
- Failures on Fedora-x86_64-native-extended-gdbserver-m32, branch master
- Failures on Fedora-x86_64-native-gdbserver-m64, branch master
- Failures on Debian-s390x-native-gdbserver-m64, branch master
- Failures on Fedora-x86_64-native-extended-gdbserver-m64, branch master