Change remote-sim.c to use type-safe registry
authorTom Tromey <tromey@adacore.com>
Wed, 26 Jun 2019 18:42:14 +0000 (12:42 -0600)
committerTom Tromey <tromey@adacore.com>
Wed, 10 Jul 2019 18:42:16 +0000 (12:42 -0600)
commit18101a352541a28b8e199b4d7b9f66989681dc02
tree4a0bac320b9c281dd33cf01c546b049324f1aca3
parent05b08ac1608c8355201db21fe4c871677466f0d5
Change remote-sim.c to use type-safe registry

This changes remote-sim.c to use the type-safe registry.

2019-07-10  Tom Tromey  <tromey@adacore.com>

* remote-sim.c (struct sim_inferior_data): Add initializers,
constructor, and destructor.
(sim_inferior_data_key): Change type.  Move lower.
(check_for_duplicate_sim_descriptor): Update.
(get_sim_inferior_data): Use new.  Update.
(~sim_inferior_data_cleanup): Rename from
sim_inferior_data_cleanup.  Simplify.
(gdbsim_close_inferior, simulator_command)
(sim_command_completer, _initialize_remote_sim): Update.
(next_pid, INITIAL_PID): Move earlier.
gdb/ChangeLog
gdb/remote-sim.c