diff options
author | Kevin Buettner <kevinb@redhat.com> | 2001-05-04 04:15:33 +0000 |
---|---|---|
committer | Kevin Buettner <kevinb@redhat.com> | 2001-05-04 04:15:33 +0000 |
commit | 39f770628a4eaf018fec8d55684bf2ec16ada9cc (patch) | |
tree | 69027cfb7df2ecc521ab2cc1d25a7dd6cbe56632 /gdb/arch-utils.c | |
parent | b1af961c8433821f61dd1849cff9eb9a8bb974e8 (diff) | |
download | ppe42-binutils-39f770628a4eaf018fec8d55684bf2ec16ada9cc.tar.gz ppe42-binutils-39f770628a4eaf018fec8d55684bf2ec16ada9cc.zip |
Phase 1 of the ptid_t changes.
Diffstat (limited to 'gdb/arch-utils.c')
-rw-r--r-- | gdb/arch-utils.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c index 0fde5db667..2b9325e6d0 100644 --- a/gdb/arch-utils.c +++ b/gdb/arch-utils.c @@ -252,11 +252,11 @@ default_prepare_to_proceed (int select_it) int generic_prepare_to_proceed (int select_it) { - int wait_pid; + ptid_t wait_ptid; struct target_waitstatus wait_status; /* Get the last target status returned by target_wait(). */ - get_last_target_status (&wait_pid, &wait_status); + get_last_target_status (&wait_ptid, &wait_status); /* Make sure we were stopped at a breakpoint. */ if (wait_status.kind != TARGET_WAITKIND_STOPPED @@ -265,10 +265,11 @@ generic_prepare_to_proceed (int select_it) return 0; } - if (wait_pid != -1 && inferior_pid != wait_pid) + if (!ptid_equal (wait_ptid, minus_one_ptid) + && !ptid_equal (inferior_ptid, wait_ptid)) { /* Switched over from WAIT_PID. */ - CORE_ADDR wait_pc = read_pc_pid (wait_pid); + CORE_ADDR wait_pc = read_pc_pid (wait_ptid); /* Avoid switching where it wouldn't do any good, i.e. if both threads are at the same breakpoint. */ @@ -278,7 +279,7 @@ generic_prepare_to_proceed (int select_it) { /* User hasn't deleted the breakpoint. Switch back to WAIT_PID and return non-zero. */ - inferior_pid = wait_pid; + inferior_ptid = wait_ptid; /* FIXME: This stuff came from switch_to_thread() in thread.c (which should probably be a public function). */ |