diff options
author | Tom de Vries <tdevries@suse.de> | 2023-08-23 19:28:37 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2023-08-23 19:28:37 +0200 |
commit | 010278690441ef32d3c1089fa4fdfaeaf8cc49b7 (patch) | |
tree | 9f1696c4381f5caff45b824d4cea54ec8e397920 /gdb/go-lang.c | |
parent | fa4f2d46f95a1c673b025fab7f292cb864a99020 (diff) | |
download | binutils-010278690441ef32d3c1089fa4fdfaeaf8cc49b7.zip binutils-010278690441ef32d3c1089fa4fdfaeaf8cc49b7.tar.gz binutils-010278690441ef32d3c1089fa4fdfaeaf8cc49b7.tar.bz2 |
[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>
Diffstat (limited to 'gdb/go-lang.c')
0 files changed, 0 insertions, 0 deletions