[gdb/build] Support reference return type in make-target-delegates.py
When doing this in target.h:
...
- virtual gdb::byte_vector thread_info_to_thread_handle (struct thread_info *)
+ virtual gdb::byte_vector &thread_info_to_thread_handle (struct thread_info *)
...
make-target-delegates.py drops the function.
By handling '&' in POINTER_PART we can prevent that the function is dropped,
but when recompiling target.o we get:
...
gdb/target-delegates.c: In member function ‘virtual gdb::byte_vector& \
debug_target::thread_info_to_thread_handle(thread_info*)’:
gdb/target-delegates.c:1889:22: error: ‘result’ declared as reference but not \
initialized
gdb::byte_vector & result;
^~~~~~
make: *** [Makefile:1923: target.o] Error 1
...
Fix this by making sure result is initialized.
Regenerate target-delegates.c using this new style.
Tested on x86_64-linux.
Approved-By: Pedro Alves <pedro@palves.net>