aboutsummaryrefslogtreecommitdiff
path: root/gdb/nto-tdep.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2023-09-29 22:36:23 -0400
committerSimon Marchi <simon.marchi@efficios.com>2023-10-19 10:57:51 -0400
commitc1d21880e981f3f890a74cd9d133e82b26c32818 (patch)
tree3c6146026e70564e495c5510d288f860ab73ea17 /gdb/nto-tdep.c
parent581b34c2a153d36876ec92bbcd1820ac1d99f83b (diff)
downloadgdb-c1d21880e981f3f890a74cd9d133e82b26c32818.zip
gdb-c1d21880e981f3f890a74cd9d133e82b26c32818.tar.gz
gdb-c1d21880e981f3f890a74cd9d133e82b26c32818.tar.bz2
gdb: make interps_notify work with references
A subsequent patch changes the interp::on_solib_loaded and interp::on_solib_unloaded methods to take references. This highlighted that interps_notify did not work with reference parameters. Fix that by changing interps_notify's `args` arg to be a universal reference (&&). Change the type of the method to be auto-deduced as an additional template parameter, otherwise the signature of the callback function would never match: CXX interps.o /home/simark/src/binutils-gdb/gdb/interps.c: In function ‘void interps_notify_signal_received(gdb_signal)’: /home/simark/src/binutils-gdb/gdb/interps.c:378:18: error: no matching function for call to ‘interps_notify(void (interp::*)(gdb_signal), gdb_signal&)’ 378 | interps_notify (&interp::on_signal_received, sig); | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/simark/src/binutils-gdb/gdb/interps.c:363:1: note: candidate: ‘template<class ... Args> void interps_notify(void (interp::*)(Args ...), Args&& ...)’ 363 | interps_notify (void (interp::*method) (Args...), Args&&... args) | ^~~~~~~~~~~~~~ /home/simark/src/binutils-gdb/gdb/interps.c:363:1: note: template argument deduction/substitution failed: /home/simark/src/binutils-gdb/gdb/interps.c:378:18: note: inconsistent parameter pack deduction with ‘gdb_signal’ and ‘gdb_signal&’ 378 | interps_notify (&interp::on_signal_received, sig); | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Change-Id: I0cd9378e24ef039f30f8e14f054f8d7fb539c838 Approved-By: Pedro Alves <pedro@palves.net> Reviewed-By: Reviewed-By: Lancelot Six <lancelot.six@amd.com>
Diffstat (limited to 'gdb/nto-tdep.c')
0 files changed, 0 insertions, 0 deletions