diff options
author | Daniel Jacobowitz <dan@debian.org> | 2007-10-23 20:05:03 +0000 |
---|---|---|
committer | Daniel Jacobowitz <dan@debian.org> | 2007-10-23 20:05:03 +0000 |
commit | 63cd6f3b8632b5b1bcf614767175432861e6f743 (patch) | |
tree | 442ba17e0fde8a6e60fc2fae69ee0f12c4c3db6e /gdb/gdbserver/linux-low.h | |
parent | d3b2d416c44c7a032f0fbf1d547c9034f501f7b9 (diff) | |
download | gdb-63cd6f3b8632b5b1bcf614767175432861e6f743.tar.gz |
* inferiors.c (change_inferior_id): Delete.
(add_pid_to_list, pull_pid_from_list): New.
* linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
(PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
(PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
(PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
(PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
(PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
(stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
(using_threads): Always set to 1.
(handle_extended_wait): New.
(add_process): Do not set TID.
(linux_create_inferior): Set must_set_ptrace_flags.
(linux_attach_lwp): Remove TID argument. Do not check using_threads.
Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
(linux_thread_alive): Rename TID argument to LWPID.
(linux_wait_for_process): Handle unknown processes. Do not use TID.
(linux_wait_for_event): Do not use TID or check using_threads. Update
call to dead_thread_notify. Call handle_extended_wait.
(linux_create_inferior): Use PTRACE_SETOPTIONS.
(send_sigstop): Delete sigstop_sent.
(wait_for_sigstop): Avoid TID.
(linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
(linux_test_for_tracefork): New.
(linux_lookup_signals): Use thread_db_active and
linux_supports_tracefork_flag.
(initialize_low): Use thread_db_active and linux_test_for_tracefork.
* linux-low.h (get_process_thread): Avoid TID.
(struct process_ifo): Move thread_known and tid to the end. Remove
sigstop_sent.
(linux_attach_lwp, thread_db_init): Update prototypes.
* server.h (change_inferior_id): Delete prototype.
(add_pid_to_list, pull_pid_from_list): New prototypes.
* thread-db.c (thread_db_use_events): New.
(find_first_thread): Rename to...
(find_one_thread): ...this. Update callers and messages. Do not
call fatal. Check thread_db_use_events. Do not call
change_inferior_id or new_thread_notify.
(maybe_attach_thread): Update. Do not call new_thread_notify.
(thread_db_init): Set thread_db_use_events. Check use_events.
* utils.c (fatal, warning): Correct message prefix.
Diffstat (limited to 'gdb/gdbserver/linux-low.h')
-rw-r--r-- | gdb/gdbserver/linux-low.h | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/gdb/gdbserver/linux-low.h b/gdb/gdbserver/linux-low.h index c94716fcef8..cdf16aaf278 100644 --- a/gdb/gdbserver/linux-low.h +++ b/gdb/gdbserver/linux-low.h @@ -81,14 +81,12 @@ extern struct linux_target_ops the_low_target; #define get_thread_process(thr) (get_process (inferior_target_data (thr))) #define get_process_thread(proc) ((struct thread_info *) \ find_inferior_id (&all_threads, \ - get_process (proc)->tid)) + get_process (proc)->lwpid)) struct process_info { struct inferior_list_entry head; - int thread_known; unsigned long lwpid; - unsigned long tid; /* If this flag is set, the next SIGSTOP will be ignored (the process will be immediately resumed). This means that either we @@ -105,10 +103,6 @@ struct process_info /* When stopped is set, the last wait status recorded for this process. */ int last_status; - /* If this flag is set, we have sent a SIGSTOP to this process and are - waiting for it to stop. */ - int sigstop_sent; - /* If this flag is set, STATUS_PENDING is a waitstatus that has not yet been reported. */ int status_pending_p; @@ -135,16 +129,19 @@ struct process_info struct thread_resume *resume; + int thread_known; + unsigned long tid; #ifdef HAVE_THREAD_DB_H - /* The thread handle, used for e.g. TLS access. */ + /* The thread handle, used for e.g. TLS access. Only valid if + THREAD_KNOWN is set. */ td_thrhandle_t th; #endif }; extern struct inferior_list all_processes; -void linux_attach_lwp (unsigned long pid, unsigned long tid); +void linux_attach_lwp (unsigned long pid); -int thread_db_init (void); +int thread_db_init (int use_events); int thread_db_get_tls_address (struct thread_info *thread, CORE_ADDR offset, CORE_ADDR load_module, CORE_ADDR *address); |