aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote-sim.c
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2001-05-04 04:15:33 +0000
committerKevin Buettner <kevinb@redhat.com>2001-05-04 04:15:33 +0000
commit39f770628a4eaf018fec8d55684bf2ec16ada9cc (patch)
tree69027cfb7df2ecc521ab2cc1d25a7dd6cbe56632 /gdb/remote-sim.c
parentb1af961c8433821f61dd1849cff9eb9a8bb974e8 (diff)
downloadgdb-39f770628a4eaf018fec8d55684bf2ec16ada9cc.zip
gdb-39f770628a4eaf018fec8d55684bf2ec16ada9cc.tar.gz
gdb-39f770628a4eaf018fec8d55684bf2ec16ada9cc.tar.bz2
Phase 1 of the ptid_t changes.
Diffstat (limited to 'gdb/remote-sim.c')
-rw-r--r--gdb/remote-sim.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c
index 890970f..71af074 100644
--- a/gdb/remote-sim.c
+++ b/gdb/remote-sim.c
@@ -86,9 +86,9 @@ static void gdbsim_close (int quitting);
static void gdbsim_detach (char *args, int from_tty);
-static void gdbsim_resume (int pid, int step, enum target_signal siggnal);
+static void gdbsim_resume (ptid_t ptid, int step, enum target_signal siggnal);
-static int gdbsim_wait (int pid, struct target_waitstatus *status);
+static ptid_t gdbsim_wait (ptid_t ptid, struct target_waitstatus *status);
static void gdbsim_prepare_to_store (void);
@@ -359,7 +359,7 @@ gdbsim_kill (void)
/* There is no need to `kill' running simulator - the simulator is
not running */
- inferior_pid = 0;
+ inferior_ptid = null_ptid;
}
/* Load an executable file into the target process. This is expected to
@@ -372,7 +372,7 @@ gdbsim_load (char *prog, int fromtty)
if (sr_get_debug ())
printf_filtered ("gdbsim_load: prog \"%s\"\n", prog);
- inferior_pid = 0;
+ inferior_ptid = null_ptid;
/* FIXME: We will print two messages on error.
Need error to either not print anything if passed NULL or need
@@ -387,7 +387,7 @@ gdbsim_load (char *prog, int fromtty)
}
-/* Start an inferior process and set inferior_pid to its pid.
+/* Start an inferior process and set inferior_ptid to its pid.
EXEC_FILE is the file to run.
ARGS is a string containing the arguments to the program.
ENV is the environment vector to pass. Errors reported with error().
@@ -430,7 +430,7 @@ gdbsim_create_inferior (char *exec_file, char *args, char **env)
argv = NULL;
sim_create_inferior (gdbsim_desc, exec_bfd, argv, env);
- inferior_pid = 42;
+ inferior_ptid = pid_to_ptid (42);
insert_breakpoints (); /* Needed to get correct instruction in cache */
clear_proceed_status ();
@@ -572,9 +572,9 @@ static enum target_signal resume_siggnal;
static int resume_step;
static void
-gdbsim_resume (int pid, int step, enum target_signal siggnal)
+gdbsim_resume (ptid_t ptid, int step, enum target_signal siggnal)
{
- if (inferior_pid != 42)
+ if (PIDGET (inferior_ptid) != 42)
error ("The program is not being run.");
if (sr_get_debug ())
@@ -634,8 +634,8 @@ gdbsim_cntrl_c (int signo)
gdbsim_stop ();
}
-static int
-gdbsim_wait (int pid, struct target_waitstatus *status)
+static ptid_t
+gdbsim_wait (ptid_t ptid, struct target_waitstatus *status)
{
static RETSIGTYPE (*prev_sigint) ();
int sigrc = 0;
@@ -697,7 +697,7 @@ gdbsim_wait (int pid, struct target_waitstatus *status)
break;
}
- return inferior_pid;
+ return inferior_ptid;
}
/* Get ready to modify the registers array. On machines which store