+/* Value of the next pid to allocate for an inferior. As indicated
+ elsewhere, its initial value is somewhat arbitrary; it's critical
+ though that it's not zero or negative. */
+static int next_pid;
+#define INITIAL_PID 42000
+
+/* Simulator-specific, per-inferior state. */
+struct sim_inferior_data {
+ explicit sim_inferior_data (SIM_DESC desc)
+ : gdbsim_desc (desc),
+ remote_sim_ptid (next_pid, 0, next_pid)
+ {
+ gdb_assert (remote_sim_ptid != null_ptid);
+ ++next_pid;
+ }
+
+ ~sim_inferior_data ();
+
+ /* Flag which indicates whether or not the program has been loaded. */
+ int program_loaded = 0;
+
+ /* Simulator descriptor for this inferior. */
+ SIM_DESC gdbsim_desc;
+
+ /* This is the ptid we use for this particular simulator instance. Its
+ value is somewhat arbitrary, as the simulator target don't have a
+ notion of tasks or threads, but we need something non-null to place
+ in inferior_ptid. For simulators which permit multiple instances,
+ we also need a unique identifier to use for each inferior. */
+ ptid_t remote_sim_ptid;
+
+ /* Signal with which to resume. */
+ enum gdb_signal resume_siggnal = GDB_SIGNAL_0;
+
+ /* Flag which indicates whether resume should step or not. */
+ int resume_step = 0;
+};
+