From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28695 invoked by alias); 18 May 2009 23:21:38 -0000 Received: (qmail 28676 invoked by uid 22791); 18 May 2009 23:21:34 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.45.13) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 18 May 2009 23:21:25 +0000 Received: from zps38.corp.google.com (zps38.corp.google.com [172.25.146.38]) by smtp-out.google.com with ESMTP id n4INLNke001224 for ; Mon, 18 May 2009 16:21:23 -0700 Received: from pzk28 (pzk28.prod.google.com [10.243.19.156]) by zps38.corp.google.com with ESMTP id n4INLL3e022473 for ; Mon, 18 May 2009 16:21:22 -0700 Received: by pzk28 with SMTP id 28so2137602pzk.18 for ; Mon, 18 May 2009 16:21:21 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.179.2 with SMTP id b2mr2088144wff.308.1242688881855; Mon, 18 May 2009 16:21:21 -0700 (PDT) In-Reply-To: <20090501225121.1C38B84890@localhost> References: <20090501225121.1C38B84890@localhost> Date: Mon, 18 May 2009 23:21:00 -0000 Message-ID: Subject: Re: [RFA] rename find_thread_pid to find_thread_ptid From: Doug Evans To: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-05/txt/msg00381.txt.bz2 Ping. Joel's comment was to rename to find_thread_from_ptid. I think that's great, but there's a lot more to be renamed along those lines than what this patch does, so I went with consistency with the current usage in gdb and just fixed the pid->ptid bug. Ok to check in? On Fri, May 1, 2009 at 3:51 PM, Doug Evans wrote: > Hi. > > Anyone mind a global renaming of find_thread_pid to find_thread_ptid? > > Tested on x86_64-linux only, but the global search-and-replace > was mechanical, not hand-done. > > > 2009-05-01 =A0Doug Evans =A0 > > =A0 =A0 =A0 =A0Global renaming of find_thread_pid to find_thread_ptid. > =A0 =A0 =A0 =A0* gdbthread.h (find_thread_ptid): Renamed from find_thread= _pid. > =A0 =A0 =A0 =A0* thread.c (find_thread_ptid): Renamed from find_thread_pi= d. > =A0 =A0 =A0 =A0(inferior_thread, add_thread_silent, thread_change_ptid): = Update. > =A0 =A0 =A0 =A0(set_running, is_thread_state, is_executing): Update. > =A0 =A0 =A0 =A0(set_executing, set_stop_requested, finish_thread_state): = Update. > =A0 =A0 =A0 =A0(do_restore_current_thread_cleanup): Update. > =A0 =A0 =A0 =A0(restore_current_thread_cleanup_dtor): Update. > =A0 =A0 =A0 =A0(make_cleanup_restore_current_thread): Update. > =A0 =A0 =A0 =A0* aix-thread.c (aix_thread_resume): Update. > =A0 =A0 =A0 =A0(aix_thread_fetch_registers, aix_thread_store_registers): = Update. > =A0 =A0 =A0 =A0* exceptions.c (throw_exception): Update. > =A0 =A0 =A0 =A0* inf-ptrace.c (inf_ptrace_follow_fork): Update. > =A0 =A0 =A0 =A0* inf-ttrace.c (inf_ttrace_follow_fork): Update. > =A0 =A0 =A0 =A0(inf_ttrace_resume, inf_ttrace_wait): Update. > =A0 =A0 =A0 =A0* infcall.c (run_inferior_call): Update. > =A0 =A0 =A0 =A0* infcmd.c (continue_command): Update. > =A0 =A0 =A0 =A0(program_info): Update. > =A0 =A0 =A0 =A0* infrun.c (proceed): Update. > =A0 =A0 =A0 =A0(infrun_thread_stop_requested_callback): Update. > =A0 =A0 =A0 =A0(handle_inferior_event): Update. > =A0 =A0 =A0 =A0* linux-nat.c (linux_child_follow_fork): Update. > =A0 =A0 =A0 =A0(linux_nat_switch_fork, get_pending_status): Update. > =A0 =A0 =A0 =A0(linux_nat_stop_lwp): Update. > =A0 =A0 =A0 =A0* linux-thread-db.c (thread_get_info_callback): Update. > =A0 =A0 =A0 =A0(attach_thread, detach_thread, find_new_threads_callback):= Update. > =A0 =A0 =A0 =A0(thread_db_find_new_threads): Update. > =A0 =A0 =A0 =A0(thread_db_get_thread_local_address): Update. > =A0 =A0 =A0 =A0* mi/mi-interp.c (mi_on_resume): Update. > > =A0 =A0 =A0 =A0In gdbserver. > =A0 =A0 =A0 =A0Global renaming of find_thread_pid to find_thread_ptid. > =A0 =A0 =A0 =A0* server.h (find_thread_ptid): Renamed from find_thread_pi= d. > =A0 =A0 =A0 =A0* inferiors.c (find_thread_ptid): Renamed from find_thread= _pid. > =A0 =A0 =A0 =A0(gdb_id_to_thread_id): Update. > =A0 =A0 =A0 =A0* remote-utils.c (prepare_resume_reply): Update. > =A0 =A0 =A0 =A0* server.c (handle_query): Update. > =A0 =A0 =A0 =A0* target.c (set_desired_inferior): Update. > > Index: aix-thread.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /cvs/src/src/gdb/aix-thread.c,v > retrieving revision 1.63 > diff -u -p -r1.63 aix-thread.c > --- aix-thread.c =A0 =A0 =A0 =A015 Mar 2009 21:05:41 -0000 =A0 =A0 =A01.63 > +++ aix-thread.c =A0 =A0 =A0 =A01 May 2009 22:24:06 -0000 > @@ -972,7 +972,7 @@ aix_thread_resume (struct target_ops *op > =A0 =A0 } > =A0 else > =A0 =A0 { > - =A0 =A0 =A0thread =3D find_thread_pid (ptid); > + =A0 =A0 =A0thread =3D find_thread_ptid (ptid); > =A0 =A0 =A0 if (!thread) > =A0 =A0 =A0 =A0error (_("aix-thread resume: unknown pthread %ld"), > =A0 =A0 =A0 =A0 =A0 =A0 =A0 TIDGET (ptid)); > @@ -1288,7 +1288,7 @@ aix_thread_fetch_registers (struct targe > =A0 =A0 beneath->to_fetch_registers (beneath, regcache, regno); > =A0 else > =A0 =A0 { > - =A0 =A0 =A0thread =3D find_thread_pid (inferior_ptid); > + =A0 =A0 =A0thread =3D find_thread_ptid (inferior_ptid); > =A0 =A0 =A0 tid =3D thread->private->tid; > > =A0 =A0 =A0 if (tid =3D=3D PTHDB_INVALID_TID) > @@ -1629,7 +1629,7 @@ aix_thread_store_registers (struct targe > =A0 =A0 beneath->to_store_registers (beneath, regcache, regno); > =A0 else > =A0 =A0 { > - =A0 =A0 =A0thread =3D find_thread_pid (inferior_ptid); > + =A0 =A0 =A0thread =3D find_thread_ptid (inferior_ptid); > =A0 =A0 =A0 tid =3D thread->private->tid; > > =A0 =A0 =A0 if (tid =3D=3D PTHDB_INVALID_TID) > Index: exceptions.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /cvs/src/src/gdb/exceptions.c,v > retrieving revision 1.33 > diff -u -p -r1.33 exceptions.c > --- exceptions.c =A0 =A0 =A0 =A013 Mar 2009 17:26:59 -0000 =A0 =A0 =A01.33 > +++ exceptions.c =A0 =A0 =A0 =A01 May 2009 22:24:06 -0000 > @@ -219,7 +219,7 @@ throw_exception (struct gdb_exception ex > =A0 immediate_quit =3D 0; > > =A0 if (!ptid_equal (inferior_ptid, null_ptid)) > - =A0 =A0tp =3D find_thread_pid (inferior_ptid); > + =A0 =A0tp =3D find_thread_ptid (inferior_ptid); > > =A0 /* Perhaps it would be cleaner to do this via the cleanup chain (not = sure > =A0 =A0 =A0I can think of a reason why that is vital, though). =A0*/ > Index: gdbthread.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /cvs/src/src/gdb/gdbthread.h,v > retrieving revision 1.47 > diff -u -p -r1.47 gdbthread.h > --- gdbthread.h 31 Mar 2009 15:23:57 -0000 =A0 =A0 =A01.47 > +++ gdbthread.h 1 May 2009 22:24:07 -0000 > @@ -224,7 +224,7 @@ extern int in_thread_list (ptid_t ptid); > =A0extern int valid_thread_id (int thread); > > =A0/* Search function to lookup a thread by 'pid'. =A0*/ > -extern struct thread_info *find_thread_pid (ptid_t ptid); > +extern struct thread_info *find_thread_ptid (ptid_t ptid); > > =A0/* Find thread by GDB user-visible thread number. =A0*/ > =A0struct thread_info *find_thread_id (int num); > Index: inf-ptrace.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /cvs/src/src/gdb/inf-ptrace.c,v > retrieving revision 1.59 > diff -u -p -r1.59 inf-ptrace.c > --- inf-ptrace.c =A0 =A0 =A0 =A017 Mar 2009 19:28:09 -0000 =A0 =A0 =A01.59 > +++ inf-ptrace.c =A0 =A0 =A0 =A01 May 2009 22:24:07 -0000 > @@ -57,7 +57,7 @@ inf_ptrace_follow_fork (struct target_op > =A0 =A0 gdb_assert (status.kind =3D=3D TARGET_WAITKIND_FORKED); > > =A0 =A0 pid =3D ptid_get_pid (ptid); > - =A0 =A0last_tp =3D find_thread_pid (ptid); > + =A0 =A0last_tp =3D find_thread_ptid (ptid); > =A0 } > > =A0 if (ptrace (PT_GET_PROCESS_STATE, pid, > Index: inf-ttrace.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /cvs/src/src/gdb/inf-ttrace.c,v > retrieving revision 1.44 > diff -u -p -r1.44 inf-ttrace.c > --- inf-ttrace.c =A0 =A0 =A0 =A017 Mar 2009 19:28:09 -0000 =A0 =A0 =A01.44 > +++ inf-ttrace.c =A0 =A0 =A0 =A01 May 2009 22:24:07 -0000 > @@ -428,7 +428,7 @@ inf_ttrace_follow_fork (struct target_op > > =A0 =A0 pid =3D ptid_get_pid (ptid); > =A0 =A0 lwpid =3D ptid_get_lwp (ptid); > - =A0 =A0last_tp =3D find_thread_pid (ptid); > + =A0 =A0last_tp =3D find_thread_ptid (ptid); > =A0 } > > =A0 /* Get all important details that core GDB doesn't (and shouldn't) > @@ -909,7 +909,7 @@ inf_ttrace_resume (struct target_ops *op > =A0 if (resume_all) > =A0 =A0 ptid =3D inferior_ptid; > > - =A0info =3D find_thread_pid (ptid); > + =A0info =3D find_thread_ptid (ptid); > =A0 inf_ttrace_resume_lwp (info, request, sig); > > =A0 if (resume_all) > @@ -982,7 +982,7 @@ inf_ttrace_wait (struct target_ops *ops, > > =A0 =A0 =A0 /* We haven't set the private member on the main thread yet. = =A0Do > =A0 =A0 =A0 =A0 it now. =A0*/ > - =A0 =A0 =A0ti =3D find_thread_pid (inferior_ptid); > + =A0 =A0 =A0ti =3D find_thread_ptid (inferior_ptid); > =A0 =A0 =A0 gdb_assert (ti !=3D NULL && ti->private =3D=3D NULL); > =A0 =A0 =A0 ti->private =3D > =A0 =A0 =A0 =A0xmalloc (sizeof (struct inf_ttrace_private_thread_info)); > @@ -1083,7 +1083,7 @@ inf_ttrace_wait (struct target_ops *ops, > =A0 =A0 case TTEVT_LWP_EXIT: > =A0 =A0 =A0 if (print_thread_events) > =A0 =A0 =A0 =A0printf_unfiltered (_("[%s exited]\n"), target_pid_to_str (= ptid)); > - =A0 =A0 =A0ti =3D find_thread_pid (ptid); > + =A0 =A0 =A0ti =3D find_thread_ptid (ptid); > =A0 =A0 =A0 gdb_assert (ti !=3D NULL); > =A0 =A0 =A0 ((struct inf_ttrace_private_thread_info *)ti->private)->dying= =3D 1; > =A0 =A0 =A0 inf_ttrace_num_lwps--; > @@ -1100,7 +1100,7 @@ inf_ttrace_wait (struct target_ops *ops, > =A0 =A0 =A0 if (print_thread_events) > =A0 =A0 =A0 =A0printf_unfiltered(_("[%s has been terminated]\n"), > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0target_pid_to_str (pti= d)); > - =A0 =A0 =A0ti =3D find_thread_pid (ptid); > + =A0 =A0 =A0ti =3D find_thread_ptid (ptid); > =A0 =A0 =A0 gdb_assert (ti !=3D NULL); > =A0 =A0 =A0 ((struct inf_ttrace_private_thread_info *)ti->private)->dying= =3D 1; > =A0 =A0 =A0 inf_ttrace_num_lwps--; > Index: infcall.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /cvs/src/src/gdb/infcall.c,v > retrieving revision 1.111 > diff -u -p -r1.111 infcall.c > --- infcall.c =A0 22 Mar 2009 17:59:59 -0000 =A0 =A0 =A01.111 > +++ infcall.c =A0 1 May 2009 22:24:07 -0000 > @@ -349,7 +349,7 @@ run_inferior_call (struct thread_info *c > > =A0 /* At this point the current thread may have changed. =A0Refresh > =A0 =A0 =A0CALL_THREAD as it could be invalid if its thread has exited. = =A0*/ > - =A0call_thread =3D find_thread_pid (call_thread_ptid); > + =A0call_thread =3D find_thread_ptid (call_thread_ptid); > > =A0 /* Don't restore the async mask if the target has changed, > =A0 =A0 =A0saved_async is for the original target. =A0*/ > Index: infcmd.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /cvs/src/src/gdb/infcmd.c,v > retrieving revision 1.238 > diff -u -p -r1.238 infcmd.c > --- infcmd.c =A0 =A025 Mar 2009 21:42:34 -0000 =A0 =A0 =A01.238 > +++ infcmd.c =A0 =A01 May 2009 22:24:07 -0000 > @@ -706,14 +706,14 @@ Can't resume all threads and specify pro > =A0 =A0 =A0 struct thread_info *tp; > > =A0 =A0 =A0 if (non_stop) > - =A0 =A0 =A0 tp =3D find_thread_pid (inferior_ptid); > + =A0 =A0 =A0 tp =3D find_thread_ptid (inferior_ptid); > =A0 =A0 =A0 else > =A0 =A0 =A0 =A0{ > =A0 =A0 =A0 =A0 =A0ptid_t last_ptid; > =A0 =A0 =A0 =A0 =A0struct target_waitstatus ws; > > =A0 =A0 =A0 =A0 =A0get_last_target_status (&last_ptid, &ws); > - =A0 =A0 =A0 =A0 tp =3D find_thread_pid (last_ptid); > + =A0 =A0 =A0 =A0 tp =3D find_thread_ptid (last_ptid); > =A0 =A0 =A0 =A0} > =A0 =A0 =A0 if (tp !=3D NULL) > =A0 =A0 =A0 =A0bs =3D tp->stop_bpstat; > @@ -1580,7 +1580,7 @@ program_info (char *args, int from_tty) > =A0 else if (is_running (ptid)) > =A0 =A0 error (_("Selected thread is running.")); > > - =A0tp =3D find_thread_pid (ptid); > + =A0tp =3D find_thread_ptid (ptid); > =A0 bs =3D tp->stop_bpstat; > =A0 stat =3D bpstat_num (&bs, &num); > > Index: infrun.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /cvs/src/src/gdb/infrun.c,v > retrieving revision 1.370 > diff -u -p -r1.370 infrun.c > --- infrun.c =A0 =A030 Apr 2009 03:09:59 -0000 =A0 =A0 =A01.370 > +++ infrun.c =A0 =A01 May 2009 22:24:07 -0000 > @@ -1413,7 +1413,7 @@ proceed (CORE_ADDR addr, enum target_sig > =A0 =A0 =A0 =A0 =A0&& !ptid_equal (last_ptid, null_ptid) > =A0 =A0 =A0 =A0 =A0&& !ptid_equal (last_ptid, minus_one_ptid)) > =A0 =A0 =A0 =A0{ > - =A0 =A0 =A0 =A0 last_thread =3D find_thread_pid (last_ptid); > + =A0 =A0 =A0 =A0 last_thread =3D find_thread_ptid (last_ptid); > =A0 =A0 =A0 =A0 =A0if (last_thread) > =A0 =A0 =A0 =A0 =A0 =A0{ > =A0 =A0 =A0 =A0 =A0 =A0 =A0tp->stop_signal =3D last_thread->stop_signal; > @@ -1645,7 +1645,7 @@ infrun_thread_stop_requested_callback (s > =A0 =A0 =A0 =A0 have consistent output as if the stop event had been > =A0 =A0 =A0 =A0 reported. =A0*/ > =A0 =A0 =A0 ecs->ptid =3D info->ptid; > - =A0 =A0 =A0ecs->event_thread =3D find_thread_pid (info->ptid); > + =A0 =A0 =A0ecs->event_thread =3D find_thread_ptid (info->ptid); > =A0 =A0 =A0 ecs->ws.kind =3D TARGET_WAITKIND_STOPPED; > =A0 =A0 =A0 ecs->ws.value.sig =3D TARGET_SIGNAL_0; > > @@ -2227,7 +2227,7 @@ handle_inferior_event (struct execution_ > =A0 =A0 =A0 && ecs->ws.kind !=3D TARGET_WAITKIND_SIGNALLED && ecs->new_th= read_event) > =A0 =A0 add_thread (ecs->ptid); > > - =A0ecs->event_thread =3D find_thread_pid (ecs->ptid); > + =A0ecs->event_thread =3D find_thread_ptid (ecs->ptid); > > =A0 /* Dependent on valid ECS->EVENT_THREAD. =A0*/ > =A0 adjust_pc_after_break (ecs); > @@ -2720,7 +2720,7 @@ targets should add new threads to the th > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0stop_signal =3D ecs->event_thread->sto= p_signal; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ecs->event_thread->stop_signal =3D TAR= GET_SIGNAL_0; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ecs->ptid =3D singlestep_ptid; > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ecs->event_thread =3D find_thread_pid (= ecs->ptid); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ecs->event_thread =3D find_thread_ptid = (ecs->ptid); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ecs->event_thread->stop_signal =3D sto= p_signal; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0stop_pc =3D new_singlestep_pc; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0} > Index: linux-nat.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /cvs/src/src/gdb/linux-nat.c,v > retrieving revision 1.128 > diff -u -p -r1.128 linux-nat.c > --- linux-nat.c 1 Apr 2009 19:07:50 -0000 =A0 =A0 =A0 1.128 > +++ linux-nat.c 1 May 2009 22:24:07 -0000 > @@ -809,7 +809,7 @@ linux_child_follow_fork (struct target_o > =A0 =A0 } > =A0 else > =A0 =A0 { > - =A0 =A0 =A0struct thread_info *last_tp =3D find_thread_pid (last_ptid); > + =A0 =A0 =A0struct thread_info *last_tp =3D find_thread_ptid (last_ptid); > =A0 =A0 =A0 struct thread_info *tp; > =A0 =A0 =A0 char child_pid_spelling[40]; > =A0 =A0 =A0 struct inferior *parent_inf, *child_inf; > @@ -1154,7 +1154,7 @@ linux_nat_switch_fork (ptid_t new_ptid) > =A0static void > =A0exit_lwp (struct lwp_info *lp) > =A0{ > - =A0struct thread_info *th =3D find_thread_pid (lp->ptid); > + =A0struct thread_info *th =3D find_thread_ptid (lp->ptid); > > =A0 if (th) > =A0 =A0 { > @@ -1505,7 +1505,7 @@ get_pending_status (struct lwp_info *lp, > =A0 =A0 =A0 =A0 =A0 =A0 have the last signal recorded in > =A0 =A0 =A0 =A0 =A0 =A0 thread_info->stop_signal. =A0*/ > > - =A0 =A0 =A0 =A0 struct thread_info *tp =3D find_thread_pid (lp->ptid); > + =A0 =A0 =A0 =A0 struct thread_info *tp =3D find_thread_ptid (lp->ptid); > =A0 =A0 =A0 =A0 =A0signo =3D tp->stop_signal; > =A0 =A0 =A0 =A0} > > @@ -1534,7 +1534,7 @@ GPT: lwp %s had signal %s, but it is in > =A0 =A0 { > =A0 =A0 =A0 if (GET_LWP (lp->ptid) =3D=3D GET_LWP (last_ptid)) > =A0 =A0 =A0 =A0{ > - =A0 =A0 =A0 =A0 struct thread_info *tp =3D find_thread_pid (lp->ptid); > + =A0 =A0 =A0 =A0 struct thread_info *tp =3D find_thread_ptid (lp->ptid); > =A0 =A0 =A0 =A0 =A0if (tp->stop_signal !=3D TARGET_SIGNAL_0 > =A0 =A0 =A0 =A0 =A0 =A0 =A0&& signal_pass_state (tp->stop_signal)) > =A0 =A0 =A0 =A0 =A0 =A0*status =3D W_STOPCODE (target_signal_to_host (tp-= >stop_signal)); > @@ -4694,7 +4694,7 @@ linux_nat_stop_lwp (struct lwp_info *lwp > > =A0 =A0 =A0 =A0 =A0if (debug_linux_nat) > =A0 =A0 =A0 =A0 =A0 =A0{ > - =A0 =A0 =A0 =A0 =A0 =A0 if (find_thread_pid (lwp->ptid)->stop_requested) > + =A0 =A0 =A0 =A0 =A0 =A0 if (find_thread_ptid (lwp->ptid)->stop_requeste= d) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0fprintf_unfiltered (gdb_stdlog, "\ > =A0LNSL: already stopped/stop_requested %s\n", > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ta= rget_pid_to_str (lwp->ptid)); > Index: linux-thread-db.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /cvs/src/src/gdb/linux-thread-db.c,v > retrieving revision 1.55 > diff -u -p -r1.55 linux-thread-db.c > --- linux-thread-db.c =A0 1 May 2009 22:05:46 -0000 =A0 =A0 =A0 1.55 > +++ linux-thread-db.c =A0 1 May 2009 22:24:07 -0000 > @@ -266,7 +266,7 @@ thread_get_info_callback (const td_thrha > > =A0 /* Fill the cache. =A0*/ > =A0 thread_ptid =3D ptid_build (GET_PID (proc_handle.ptid), ti.ti_lid, 0); > - =A0thread_info =3D find_thread_pid (thread_ptid); > + =A0thread_info =3D find_thread_ptid (thread_ptid); > > =A0 /* In the case of a zombie thread, don't continue. =A0We don't want to > =A0 =A0 =A0attach to it thinking it is a new thread. =A0*/ > @@ -284,7 +284,7 @@ thread_get_info_callback (const td_thrha > =A0 =A0 =A0 =A0thread_db_find_new_threads_1 (); > =A0 =A0 =A0 else > =A0 =A0 =A0 =A0attach_thread (thread_ptid, thp, &ti); > - =A0 =A0 =A0thread_info =3D find_thread_pid (thread_ptid); > + =A0 =A0 =A0thread_info =3D find_thread_ptid (thread_ptid); > =A0 =A0 =A0 gdb_assert (thread_info !=3D NULL); > =A0 =A0 } > > @@ -696,7 +696,7 @@ attach_thread (ptid_t ptid, const td_thr > =A0 =A0 =A0thread and attach to the new one. =A0*/ > =A0 if (in_thread_list (ptid)) > =A0 =A0 { > - =A0 =A0 =A0tp =3D find_thread_pid (ptid); > + =A0 =A0 =A0tp =3D find_thread_ptid (ptid); > =A0 =A0 =A0 gdb_assert (tp !=3D NULL); > > =A0 =A0 =A0 /* If tp->private is NULL, then GDB is already attached to th= is > @@ -765,7 +765,7 @@ detach_thread (ptid_t ptid) > =A0 =A0 =A0until we notice that it's dead (via prune_threads), or until > =A0 =A0 =A0something re-uses its thread ID. =A0We'll report the thread ex= it > =A0 =A0 =A0when the underlying LWP dies. =A0*/ > - =A0thread_info =3D find_thread_pid (ptid); > + =A0thread_info =3D find_thread_ptid (ptid); > =A0 gdb_assert (thread_info !=3D NULL && thread_info->private !=3D NULL); > =A0 thread_info->private->dying =3D 1; > =A0} > @@ -981,7 +981,7 @@ find_new_threads_callback (const td_thrh > =A0 =A0 =A0 return 0; > =A0 =A0 } > > - =A0tp =3D find_thread_pid (ptid); > + =A0tp =3D find_thread_ptid (ptid); > =A0 if (tp =3D=3D NULL || tp->private =3D=3D NULL) > =A0 =A0 attach_thread (ptid, th_p, &ti); > > @@ -1026,7 +1026,7 @@ thread_db_find_new_threads (struct targe > =A0static char * > =A0thread_db_pid_to_str (struct target_ops *ops, ptid_t ptid) > =A0{ > - =A0struct thread_info *thread_info =3D find_thread_pid (ptid); > + =A0struct thread_info *thread_info =3D find_thread_ptid (ptid); > =A0 struct target_ops *beneath; > > =A0 if (thread_info !=3D NULL && thread_info->private !=3D NULL) > @@ -1080,7 +1080,7 @@ thread_db_get_thread_local_address (stru > =A0 =A0 thread_db_find_new_threads_1 (); > > =A0 /* Find the matching thread. =A0*/ > - =A0thread_info =3D find_thread_pid (ptid); > + =A0thread_info =3D find_thread_ptid (ptid); > > =A0 if (thread_info !=3D NULL && thread_info->private !=3D NULL) > =A0 =A0 { > Index: thread.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /cvs/src/src/gdb/thread.c,v > retrieving revision 1.109 > diff -u -p -r1.109 thread.c > --- thread.c =A0 =A031 Mar 2009 15:23:57 -0000 =A0 =A0 =A01.109 > +++ thread.c =A0 =A01 May 2009 22:24:07 -0000 > @@ -75,7 +75,7 @@ enum thread_state > =A0struct thread_info* > =A0inferior_thread (void) > =A0{ > - =A0struct thread_info *tp =3D find_thread_pid (inferior_ptid); > + =A0struct thread_info *tp =3D find_thread_ptid (inferior_ptid); > =A0 gdb_assert (tp); > =A0 return tp; > =A0} > @@ -146,7 +146,7 @@ add_thread_silent (ptid_t ptid) > =A0{ > =A0 struct thread_info *tp; > > - =A0tp =3D find_thread_pid (ptid); > + =A0tp =3D find_thread_ptid (ptid); > =A0 if (tp) > =A0 =A0 /* Found an old thread with the same id. =A0It has to be dead, > =A0 =A0 =A0 =A0otherwise we wouldn't be adding a new thread with the same= id. > @@ -302,7 +302,7 @@ find_thread_id (int num) > > =A0/* Find a thread_info by matching PTID. =A0*/ > =A0struct thread_info * > -find_thread_pid (ptid_t ptid) > +find_thread_ptid (ptid_t ptid) > =A0{ > =A0 struct thread_info *tp; > > @@ -499,7 +499,7 @@ thread_change_ptid (ptid_t old_ptid, pti > =A0 inf =3D find_inferior_pid (ptid_get_pid (old_ptid)); > =A0 inf->pid =3D ptid_get_pid (new_ptid); > > - =A0tp =3D find_thread_pid (old_ptid); > + =A0tp =3D find_thread_ptid (old_ptid); > =A0 tp->ptid =3D new_ptid; > > =A0 observer_notify_thread_ptid_changed (old_ptid, new_ptid); > @@ -530,7 +530,7 @@ set_running (ptid_t ptid, int running) > =A0 else > =A0 =A0 { > =A0 =A0 =A0 int started =3D 0; > - =A0 =A0 =A0tp =3D find_thread_pid (ptid); > + =A0 =A0 =A0tp =3D find_thread_ptid (ptid); > =A0 =A0 =A0 gdb_assert (tp); > =A0 =A0 =A0 gdb_assert (tp->state_ !=3D THREAD_EXITED); > =A0 =A0 =A0 if (running && tp->state_ =3D=3D THREAD_STOPPED) > @@ -549,7 +549,7 @@ is_thread_state (ptid_t ptid, enum threa > =A0 if (!target_has_execution) > =A0 =A0 return 0; > > - =A0tp =3D find_thread_pid (ptid); > + =A0tp =3D find_thread_ptid (ptid); > =A0 gdb_assert (tp); > =A0 return tp->state_ =3D=3D state; > =A0} > @@ -607,7 +607,7 @@ is_executing (ptid_t ptid) > =A0 if (!target_has_execution) > =A0 =A0 return 0; > > - =A0tp =3D find_thread_pid (ptid); > + =A0tp =3D find_thread_ptid (ptid); > =A0 gdb_assert (tp); > =A0 return tp->executing_; > =A0} > @@ -624,7 +624,7 @@ set_executing (ptid_t ptid, int executin > =A0 =A0 } > =A0 else > =A0 =A0 { > - =A0 =A0 =A0tp =3D find_thread_pid (ptid); > + =A0 =A0 =A0tp =3D find_thread_ptid (ptid); > =A0 =A0 =A0 gdb_assert (tp); > =A0 =A0 =A0 tp->executing_ =3D executing; > =A0 =A0 } > @@ -644,7 +644,7 @@ set_stop_requested (ptid_t ptid, int sto > =A0 =A0 } > =A0 else > =A0 =A0 { > - =A0 =A0 =A0tp =3D find_thread_pid (ptid); > + =A0 =A0 =A0tp =3D find_thread_ptid (ptid); > =A0 =A0 =A0 gdb_assert (tp); > =A0 =A0 =A0 tp->stop_requested =3D stop; > =A0 =A0 } > @@ -680,7 +680,7 @@ finish_thread_state (ptid_t ptid) > =A0 =A0 } > =A0 else > =A0 =A0 { > - =A0 =A0 =A0tp =3D find_thread_pid (ptid); > + =A0 =A0 =A0tp =3D find_thread_ptid (ptid); > =A0 =A0 =A0 gdb_assert (tp); > =A0 =A0 =A0 if (tp->state_ !=3D THREAD_EXITED) > =A0 =A0 =A0 =A0{ > @@ -933,7 +933,7 @@ do_restore_current_thread_cleanup (void > =A0 struct thread_info *tp; > =A0 struct current_thread_cleanup *old =3D arg; > > - =A0tp =3D find_thread_pid (old->inferior_ptid); > + =A0tp =3D find_thread_ptid (old->inferior_ptid); > > =A0 /* If the previously selected thread belonged to a process that has > =A0 =A0 =A0in the mean time been deleted (due to normal exit, detach, etc= .), > @@ -962,7 +962,7 @@ restore_current_thread_cleanup_dtor (voi > =A0{ > =A0 struct current_thread_cleanup *old =3D arg; > =A0 struct thread_info *tp; > - =A0tp =3D find_thread_pid (old->inferior_ptid); > + =A0tp =3D find_thread_ptid (old->inferior_ptid); > =A0 if (tp) > =A0 =A0 tp->refcount--; > =A0 xfree (old); > @@ -992,7 +992,7 @@ make_cleanup_restore_current_thread (voi > =A0 =A0 =A0 old->selected_frame_id =3D get_frame_id (frame); > =A0 =A0 =A0 old->selected_frame_level =3D frame_relative_level (frame); > > - =A0 =A0 =A0tp =3D find_thread_pid (inferior_ptid); > + =A0 =A0 =A0tp =3D find_thread_ptid (inferior_ptid); > =A0 =A0 =A0 if (tp) > =A0 =A0 =A0 =A0tp->refcount++; > =A0 =A0 } > Index: mi/mi-interp.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /cvs/src/src/gdb/mi/mi-interp.c,v > retrieving revision 1.46 > diff -u -p -r1.46 mi-interp.c > --- mi/mi-interp.c =A0 =A0 =A025 Mar 2009 21:53:11 -0000 =A0 =A0 =A01.46 > +++ mi/mi-interp.c =A0 =A0 =A01 May 2009 22:24:07 -0000 > @@ -397,7 +397,7 @@ mi_on_resume (ptid_t ptid) > =A0 if (ptid_equal (ptid, minus_one_ptid)) > =A0 =A0 tp =3D inferior_thread (); > =A0 else > - =A0 =A0tp =3D find_thread_pid (ptid); > + =A0 =A0tp =3D find_thread_ptid (ptid); > > =A0 /* Suppress output while calling an inferior function. =A0*/ > =A0 if (tp->in_infcall) > @@ -428,7 +428,7 @@ mi_on_resume (ptid_t ptid) > =A0 =A0 } > =A0 else > =A0 =A0 { > - =A0 =A0 =A0struct thread_info *ti =3D find_thread_pid (ptid); > + =A0 =A0 =A0struct thread_info *ti =3D find_thread_ptid (ptid); > =A0 =A0 =A0 gdb_assert (ti); > =A0 =A0 =A0 fprintf_unfiltered (raw_stdout, "*running,thread-id=3D\"%d\"\= n", ti->num); > =A0 =A0 } > Index: gdbserver/inferiors.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /cvs/src/src/gdb/gdbserver/inferiors.c,v > retrieving revision 1.22 > diff -u -p -r1.22 inferiors.c > --- gdbserver/inferiors.c =A0 =A0 =A0 30 Apr 2009 22:21:06 -0000 =A0 =A0 = =A01.22 > +++ gdbserver/inferiors.c =A0 =A0 =A0 1 May 2009 22:24:07 -0000 > @@ -210,7 +210,7 @@ thread_to_gdb_id (struct thread_info *th > =A0} > > =A0struct thread_info * > -find_thread_pid (ptid_t ptid) > +find_thread_ptid (ptid_t ptid) > =A0{ > =A0 struct inferior_list_entry *inf =3D all_threads.head; > > @@ -228,7 +228,7 @@ find_thread_pid (ptid_t ptid) > =A0ptid_t > =A0gdb_id_to_thread_id (ptid_t gdb_id) > =A0{ > - =A0struct thread_info *thread =3D find_thread_pid (gdb_id); > + =A0struct thread_info *thread =3D find_thread_ptid (gdb_id); > > =A0 return thread ? thread->entry.id : null_ptid; > =A0} > Index: gdbserver/remote-utils.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /cvs/src/src/gdb/gdbserver/remote-utils.c,v > retrieving revision 1.66 > diff -u -p -r1.66 remote-utils.c > --- gdbserver/remote-utils.c =A0 =A03 Apr 2009 14:38:38 -0000 =A0 =A0 =A0= 1.66 > +++ gdbserver/remote-utils.c =A0 =A01 May 2009 22:24:07 -0000 > @@ -1091,7 +1091,7 @@ prepare_resume_reply (char *buf, ptid_t > > =A0 =A0 =A0 =A0saved_inferior =3D current_inferior; > > - =A0 =A0 =A0 current_inferior =3D find_thread_pid (ptid); > + =A0 =A0 =A0 current_inferior =3D find_thread_ptid (ptid); > > =A0 =A0 =A0 =A0if (the_target->stopped_by_watchpoint !=3D NULL > =A0 =A0 =A0 =A0 =A0 =A0&& (*the_target->stopped_by_watchpoint) ()) > Index: gdbserver/server.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /cvs/src/src/gdb/gdbserver/server.c,v > retrieving revision 1.96 > diff -u -p -r1.96 server.c > --- gdbserver/server.c =A030 Apr 2009 22:21:06 -0000 =A0 =A0 =A01.96 > +++ gdbserver/server.c =A01 May 2009 22:24:07 -0000 > @@ -1156,7 +1156,7 @@ handle_query (char *own_buf, int packet_ > =A0 =A0 =A0 =A0err =3D 1; > =A0 =A0 =A0 else > =A0 =A0 =A0 =A0{ > - =A0 =A0 =A0 =A0 struct thread_info *thread =3D find_thread_pid (ptid); > + =A0 =A0 =A0 =A0 struct thread_info *thread =3D find_thread_ptid (ptid); > > =A0 =A0 =A0 =A0 =A0if (thread =3D=3D NULL) > =A0 =A0 =A0 =A0 =A0 =A0err =3D 2; > Index: gdbserver/server.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /cvs/src/src/gdb/gdbserver/server.h,v > retrieving revision 1.57 > diff -u -p -r1.57 server.h > --- gdbserver/server.h =A030 Apr 2009 22:21:06 -0000 =A0 =A0 =A01.57 > +++ gdbserver/server.h =A01 May 2009 22:24:07 -0000 > @@ -239,7 +239,7 @@ struct process_info *find_process_pid (i > =A0int have_started_inferiors_p (void); > =A0int have_attached_inferiors_p (void); > > -struct thread_info *find_thread_pid (ptid_t ptid); > +struct thread_info *find_thread_ptid (ptid_t ptid); > > =A0ptid_t thread_id_to_gdb_id (ptid_t); > =A0ptid_t thread_to_gdb_id (struct thread_info *); > Index: gdbserver/target.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /cvs/src/src/gdb/gdbserver/target.c,v > retrieving revision 1.15 > diff -u -p -r1.15 target.c > --- gdbserver/target.c =A01 Apr 2009 22:50:24 -0000 =A0 =A0 =A0 1.15 > +++ gdbserver/target.c =A01 May 2009 22:24:07 -0000 > @@ -29,7 +29,7 @@ set_desired_inferior (int use_general) > =A0 struct thread_info *found; > > =A0 if (use_general =3D=3D 1) > - =A0 =A0found =3D find_thread_pid (general_thread); > + =A0 =A0found =3D find_thread_ptid (general_thread); > =A0 else > =A0 =A0 { > =A0 =A0 =A0 found =3D NULL; > @@ -41,10 +41,10 @@ set_desired_inferior (int use_general) > =A0 =A0 =A0 =A0 =A0 && !ptid_equal (step_thread, minus_one_ptid)) > =A0 =A0 =A0 =A0 =A0&& (ptid_equal (cont_thread, null_ptid) > =A0 =A0 =A0 =A0 =A0 =A0 =A0|| ptid_equal (cont_thread, minus_one_ptid))) > - =A0 =A0 =A0 found =3D find_thread_pid (step_thread); > + =A0 =A0 =A0 found =3D find_thread_ptid (step_thread); > > =A0 =A0 =A0 if (found =3D=3D NULL) > - =A0 =A0 =A0 found =3D find_thread_pid (cont_thread); > + =A0 =A0 =A0 found =3D find_thread_ptid (cont_thread); > =A0 =A0 } > > =A0 if (found =3D=3D NULL) >