Fix GDB builds that include the simulator
authorPedro Alves <palves@redhat.com>
Tue, 18 Jul 2017 10:38:17 +0000 (11:38 +0100)
committerPedro Alves <palves@redhat.com>
Tue, 18 Jul 2017 10:38:17 +0000 (11:38 +0100)
commit386535dd91432b784f6a46f8a92c6a599ba30174
treedde4a840f347150c793c61eae71cb1769ceae0b7
parent0a79bef4f206d89214c48454a4302d6b6f8f68c0
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.
gdb/ChangeLog
gdb/remote-sim.c
This page took 0.031222 seconds and 4 git commands to generate.