]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/top.c
Phase 1 of the ptid_t changes.
[thirdparty/binutils-gdb.git] / gdb / top.c
index 77d6c6a8220874143408a2bbab85d3fa78302212..be4504d68bafa01e457d3e774d71e54344625569 100644 (file)
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -341,7 +341,8 @@ void (*memory_changed_hook) (CORE_ADDR addr, int len);
 /* Called when going to wait for the target.  Usually allows the GUI to run
    while waiting for target events.  */
 
-int (*target_wait_hook) (int pid, struct target_waitstatus * status);
+ptid_t (*target_wait_hook) (ptid_t ptid,
+                            struct target_waitstatus * status);
 
 /* Used by UI as a wrapper around command execution.  May do various things
    like enabling/disabling buttons, etc...  */
@@ -1709,7 +1710,7 @@ set_prompt (char *s)
 int
 quit_confirm (void)
 {
-  if (inferior_pid != 0 && target_has_execution)
+  if (! ptid_equal (inferior_ptid, null_ptid) && target_has_execution)
     {
       char *s;
 
@@ -1746,7 +1747,7 @@ quit_force (char *args, int from_tty)
       exit_code = (int) value_as_long (val);
     }
 
-  if (inferior_pid != 0 && target_has_execution)
+  if (! ptid_equal (inferior_ptid, null_ptid) && target_has_execution)
     {
       if (attach_flag)
        target_detach (args, from_tty);