Fix GDB builds that include the simulator
The completer rewrite series missed adjusting target sim to the new
completion_tracker interface.
src/gdb/remote-sim.c: In function ‘void _initialize_remote_sim()’:
src/gdb/remote-sim.c:1350:46: error: invalid conversion from ‘VEC_char_ptr* (*)(cmd_list_element*, const char*, const char*)’ to ‘void (*)(cmd_list_element*, completion_tracker&, const char*, const char*)’ [-fpermissive]
set_cmd_completer (c, sim_command_completer);
^
This commit fixes it, and also takes care to be exception safe (the
previous code would leak if growing the VEC throws).
Tested manually with a --target=arm-none-eabi build.
gdb/ChangeLog:
2017-07-18 Pedro Alves <palves@redhat.com>
* remote-sim.c (sim_command_completer): Adjust to work with a
completion_tracker instead of a VEC.