diff options
author | Pedro Alves <palves@redhat.com> | 2008-09-22 15:18:30 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2008-09-22 15:18:30 +0000 |
commit | 82f7388440b4dc733616a6a85e9dfd290089e508 (patch) | |
tree | 96f5da1d4b95212f3c2a569382a9d017fcf46047 /gdb/inferior.h | |
parent | 7f9f62ba187205cd123fd2e96909e6d19ad708eb (diff) | |
download | gdb-82f7388440b4dc733616a6a85e9dfd290089e508.zip gdb-82f7388440b4dc733616a6a85e9dfd290089e508.tar.gz gdb-82f7388440b4dc733616a6a85e9dfd290089e508.tar.bz2 |
Implement remote multi-process extensions.
* remote.c (struct remote_state): Add extended and
multi_process_aware fields.
(remote_multi_process_p): New.
(PACKET_vKill): New.
(record_currthread): Use thread_change_ptid. Notice new
inferiors.
(set_thread, remote_thread_alive): Use write_ptid.
(write_ptid, read_ptid): New.
(remote_current_thread, remote_threads_extra_info): Use them.
(remote_threads_info): Likewise. Detect new inferiors.
(remote_start_remote): Add inferior to inferior list.
(remote_multi_process_feature): New.
(remote_protocol_features): Add "multiprocess" feature.
(remote_query_supported): Pass "multiprocess+" as supported
features.
(remote_open_1): Clear multi_process_aware. Set extended
accordingly.
(remote_detach_1): Detach current process. Use extended packet
format for extended-remote multi-process. Detach process from the
inferior list. Only mourn after printing output.
(extended_remote_attach_1): Add process to the inferior list.
(remote_vcont_resume): Use write_ptid to pass the thread ids.
(remote_wait): Use read_ptid. Implement the extended
multi-process extension format of the 'W' and 'X' reply packets.
Remove exited inferiors from inferior list.
(remote_xfer_memory): Set general thread.
(remote_vkill): New.
(extended_remote_kill): New.
(remote_mourn_1): Discard all inferiors.
(select_new_thread_callback): New.
(extended_remote_mourn_1): If there are more processes to debug,
switch to a thread in another process, and don't pop the target.
(extended_remote_create_inferior_1): Add the new process to the
inferior list.
(remote_stopped_by_watchpoint): Indenting.
(remote_xfer_partial): Set the general thread.
(remote_pid_to_str): If the remote is multi-process aware, print
the process id as well as the thread id.
(remote_get_thread_local_address): Use write_ptid.
(init_extended_remote_ops): Register extended_remote_kill.
(_initialize_remote): Register new packets. Change
magic_null_ptid's, not_sent_ptid's and any_thread_ptid's pid
member to 42000.
* thread.c (thread_change_ptid): Also account for the inferior pid
changing.
* inferior.h (discard_all_inferiors): Declare.
* inferior.c (discard_all_inferiors): New.
Diffstat (limited to 'gdb/inferior.h')
-rw-r--r-- | gdb/inferior.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/inferior.h b/gdb/inferior.h index 58165d7..51bee34 100644 --- a/gdb/inferior.h +++ b/gdb/inferior.h @@ -450,6 +450,9 @@ extern void delete_inferior_silent (int pid); /* Delete an existing inferior list entry, due to inferior detaching. */ extern void detach_inferior (int pid); +/* Get rid of all inferiors. */ +extern void discard_all_inferiors (void); + /* Translate the integer inferior id (GDB's homegrown id, not the system's) into a "pid" (which may be overloaded with extra inferior information). */ extern int gdb_inferior_id_to_pid (int); |