aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/thread-db.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2009-03-17 20:25:35 +0000
committerPedro Alves <palves@redhat.com>2009-03-17 20:25:35 +0000
commit54a0b537b8b8ebf14fe9cb3fc82e1ae090d5d6bb (patch)
treedf9936b76bbe5df2fb2f2fd044540ae8d4bb39bc /gdb/gdbserver/thread-db.c
parent7d85a9c0e3639345cb6d19c139ccb9da5095fc76 (diff)
downloadgdb-54a0b537b8b8ebf14fe9cb3fc82e1ae090d5d6bb.zip
gdb-54a0b537b8b8ebf14fe9cb3fc82e1ae090d5d6bb.tar.gz
gdb-54a0b537b8b8ebf14fe9cb3fc82e1ae090d5d6bb.tar.bz2
Rename "process" to "lwp" throughout.
* linux-low.c (all_processes): Rename to... (all_lwps): ... this. (inferior_pid, handle_extended_wait, get_stop_pc): Adjust. (add_process): Rename to ... (add_lwp): ... this. Adjust. (linux_create_inferior): Adjust. (linux_attach_lwp): Adjust. (linux_attach): Adjust. (linux_kill_one_process): Rename to ... (linux_kill_one_lwp): ... this. Adjust. (linux_kill): Adjust. (linux_detach_one_process): Rename to ... (linux_detach_one_lwp): ... this. Adjust. (linux_detach): Adjust. (check_removed_breakpoint): Adjust. (status_pending_p): Adjust. (linux_wait_for_process): Rename to ... (linux_wait_for_lwp): ... this. Adjust. (linux_wait_for_event): Adjust. (send_sigstop): Adjust. (wait_for_sigstop): Adjust. (stop_all_processes): Rename to ... (stop_all_lwps): ... this. (linux_resume_one_process): Rename to ... (linux_resume_one_lwp): ... this. Adjust. (linux_set_resume_request, linux_continue_one_thread) (linux_queue_one_thread, resume_status_pending_p) (usr_store_inferior_registers, regsets_store_inferior_registers) (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo): Adjust. * linux-low.h (get_process): Rename to ... (get_lwp): ... this. Adjust. (get_thread_process): Rename to ... (get_thread_lwp): ... this. Adjust. (get_process_thread): Rename to ... (get_lwp_thread): ... this. Adjust. (struct process_info): Rename to ... (struct lwp_info): ... this. (all_processes): Rename to ... (all_lwps): ... this. * proc-service.c (ps_lgetregs): Adjust. * thread-db.c (thread_db_create_event, find_one_thread) (maybe_attach_thread, thread_db_get_tls_address): Adjust.
Diffstat (limited to 'gdb/gdbserver/thread-db.c')
-rw-r--r--gdb/gdbserver/thread-db.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/gdb/gdbserver/thread-db.c b/gdb/gdbserver/thread-db.c
index e36b0fb..60a4bd3 100644
--- a/gdb/gdbserver/thread-db.c
+++ b/gdb/gdbserver/thread-db.c
@@ -136,7 +136,7 @@ thread_db_create_event (CORE_ADDR where)
{
td_event_msg_t msg;
td_err_e err;
- struct process_info *process;
+ struct lwp_info *lwp;
if (debug_threads)
fprintf (stderr, "Thread creation event.\n");
@@ -153,9 +153,9 @@ thread_db_create_event (CORE_ADDR where)
/* If we do not know about the main thread yet, this would be a good time to
find it. We need to do this to pick up the main thread before any newly
created threads. */
- process = get_thread_process (current_inferior);
- if (process->thread_known == 0)
- find_one_thread (process->lwpid);
+ lwp = get_thread_lwp (current_inferior);
+ if (lwp->thread_known == 0)
+ find_one_thread (lwp->lwpid);
/* msg.event == TD_EVENT_CREATE */
@@ -237,15 +237,15 @@ find_one_thread (int lwpid)
td_thrinfo_t ti;
td_err_e err;
struct thread_info *inferior;
- struct process_info *process;
+ struct lwp_info *lwp;
inferior = (struct thread_info *) find_inferior_id (&all_threads, lwpid);
- process = get_thread_process (inferior);
- if (process->thread_known)
+ lwp = get_thread_lwp (inferior);
+ if (lwp->thread_known)
return 1;
/* Get information about this thread. */
- err = td_ta_map_lwp2thr (thread_agent, process->lwpid, &th);
+ err = td_ta_map_lwp2thr (thread_agent, lwp->lwpid, &th);
if (err != TD_OK)
error ("Cannot get thread handle for LWP %d: %s",
lwpid, thread_db_err_str (err));
@@ -259,10 +259,10 @@ find_one_thread (int lwpid)
fprintf (stderr, "Found thread %ld (LWP %d)\n",
ti.ti_tid, ti.ti_lid);
- if (process->lwpid != ti.ti_lid)
+ if (lwp->lwpid != ti.ti_lid)
{
warning ("PID mismatch! Expected %ld, got %ld",
- (long) process->lwpid, (long) ti.ti_lid);
+ (long) lwp->lwpid, (long) ti.ti_lid);
return 0;
}
@@ -279,8 +279,8 @@ find_one_thread (int lwpid)
if (ti.ti_tid == 0)
return 0;
- process->thread_known = 1;
- process->th = th;
+ lwp->thread_known = 1;
+ lwp->th = th;
return 1;
}
@@ -290,7 +290,7 @@ maybe_attach_thread (const td_thrhandle_t *th_p, td_thrinfo_t *ti_p)
{
td_err_e err;
struct thread_info *inferior;
- struct process_info *process;
+ struct lwp_info *lwp;
inferior = (struct thread_info *) find_inferior_id (&all_threads,
ti_p->ti_lid);
@@ -310,10 +310,10 @@ maybe_attach_thread (const td_thrhandle_t *th_p, td_thrinfo_t *ti_p)
return;
}
- process = inferior_target_data (inferior);
+ lwp = inferior_target_data (inferior);
- process->thread_known = 1;
- process->th = *th_p;
+ lwp->thread_known = 1;
+ lwp->th = *th_p;
if (thread_db_use_events)
{
@@ -384,18 +384,18 @@ thread_db_get_tls_address (struct thread_info *thread, CORE_ADDR offset,
#if HAVE_TD_THR_TLS_GET_ADDR
psaddr_t addr;
td_err_e err;
- struct process_info *process;
+ struct lwp_info *lwp;
- process = get_thread_process (thread);
- if (!process->thread_known)
- find_one_thread (process->lwpid);
- if (!process->thread_known)
+ lwp = get_thread_lwp (thread);
+ if (!lwp->thread_known)
+ find_one_thread (lwp->lwpid);
+ if (!lwp->thread_known)
return TD_NOTHR;
/* Note the cast through uintptr_t: this interface only works if
a target address fits in a psaddr_t, which is a host pointer.
So a 32-bit debugger can not access 64-bit TLS through this. */
- err = td_thr_tls_get_addr (&process->th, (psaddr_t) (uintptr_t) load_module,
+ err = td_thr_tls_get_addr (&lwp->th, (psaddr_t) (uintptr_t) load_module,
offset, &addr);
if (err == TD_OK)
{