gdb: make get_interp_info return a reference
authorSimon Marchi <simon.marchi@efficios.com>
Thu, 2 Mar 2023 20:32:22 +0000 (15:32 -0500)
committerSimon Marchi <simon.marchi@polymtl.ca>
Tue, 7 Mar 2023 21:30:08 +0000 (16:30 -0500)
commitf4db482bac97b12de5b25c203e3d24116e2a46bb
tree221fb2b3037af3d4f6ca2b111edb3938e9833e94
parent4779ed9757fa71e6743fb7fc1f9eeae8267ae36c
gdb: make get_interp_info return a reference

get_interp_info and get_current_interp_info always return non-nullptr,
so they can return a reference instead of a pointer.

Since we don't need to copy it, make ui_interp_info non-copyiable, to
avoid a copying it in a local variable, instead of getting a reference.

Change-Id: I6d8dea92dc26a58ea340d04862db6b8d9cf906a0
Reviewed-By: Tom Tromey <tom@tromey.com>
gdb/interps.c