summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alves <pedro@codesourcery.com>2008-12-16 22:48:30 +0000
committerPedro Alves <pedro@codesourcery.com>2008-12-16 22:48:30 +0000
commite33e6409504273f77f9322237669aeebe9af4b32 (patch)
treeb22af70237c24d6eee9c7a10aece3c51ee6d60ec
parentf8e27f4b40062ea33bf3424944ee668a7e43baef (diff)
downloadgdb-e33e6409504273f77f9322237669aeebe9af4b32.tar.gz
Merge from head:
2008-12-12 Pedro Alves <pedro@codesourcery.com> * remote.c (remote_detach_1): Don't delete the inferior here. (process_stop_reply): Ditto. (extended_remote_kill): Ditto.
-rw-r--r--gdb/ChangeLog.mp9
-rw-r--r--gdb/remote.c41
2 files changed, 27 insertions, 23 deletions
diff --git a/gdb/ChangeLog.mp b/gdb/ChangeLog.mp
index 649895a828a..67033d30255 100644
--- a/gdb/ChangeLog.mp
+++ b/gdb/ChangeLog.mp
@@ -1,6 +1,15 @@
2008-12-16 Pedro Alves <pedro@codesourcery.com>
Merge from head:
+ 2008-12-12 Pedro Alves <pedro@codesourcery.com>
+
+ * remote.c (remote_detach_1): Don't delete the inferior here.
+ (process_stop_reply): Ditto.
+ (extended_remote_kill): Ditto.
+
+2008-12-16 Pedro Alves <pedro@codesourcery.com>
+
+ Merge from head:
2008-12-11 Pedro Alves <pedro@codesourcery.com>
* infcmd.c (step_1): Use step_once in the synchronous case too.
diff --git a/gdb/remote.c b/gdb/remote.c
index 0d1d79f06d3..ad4e3fb69b2 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -3377,7 +3377,6 @@ remote_detach_1 (char *args, int from_tty, int extended)
}
discard_pending_stop_replies (pid);
- detach_inferior (pid);
target_mourn_inferior ();
}
@@ -4629,32 +4628,29 @@ process_stop_reply (struct stop_reply *stop_reply,
if (ptid_equal (ptid, null_ptid))
ptid = inferior_ptid;
- if (status->kind == TARGET_WAITKIND_EXITED
- || status->kind == TARGET_WAITKIND_SIGNALLED)
+ if (status->kind != TARGET_WAITKIND_EXITED
+ && status->kind != TARGET_WAITKIND_SIGNALLED)
{
- int pid = ptid_get_pid (ptid);
- delete_inferior (pid);
- }
- else
- notice_new_inferiors (ptid, 0);
+ /* Expedited registers. */
+ if (stop_reply->regcache)
+ {
+ cached_reg_t *reg;
+ int ix;
+
+ for (ix = 0;
+ VEC_iterate(cached_reg_t, stop_reply->regcache, ix, reg);
+ ix++)
+ regcache_raw_supply (get_thread_regcache (ptid),
+ reg->num, reg->data);
+ VEC_free (cached_reg_t, stop_reply->regcache);
+ }
- /* Expedited registers. */
- if (stop_reply->regcache)
- {
- cached_reg_t *reg;
- int ix;
+ notice_new_inferiors (ptid, 0);
- for (ix = 0;
- VEC_iterate(cached_reg_t, stop_reply->regcache, ix, reg);
- ix++)
- regcache_raw_supply (get_thread_regcache (ptid),
- reg->num, reg->data);
- VEC_free (cached_reg_t, stop_reply->regcache);
+ remote_stopped_by_watchpoint_p = stop_reply->stopped_by_watchpoint_p;
+ remote_watch_data_address = stop_reply->watch_data_address;
}
- remote_stopped_by_watchpoint_p = stop_reply->stopped_by_watchpoint_p;
- remote_watch_data_address = stop_reply->watch_data_address;
-
stop_reply_xfree (stop_reply);
return ptid;
}
@@ -6635,7 +6631,6 @@ extended_remote_kill (void)
if (res != 0)
error (_("Can't kill process"));
- delete_inferior (pid);
target_mourn_inferior ();
}