[GDBserver] Remove td_ta_event_addr td_ta_set_event and td_ta_event_getmsg

Message ID 1470043144-21617-1-git-send-email-yao.qi@linaro.org
State New, archived
Headers

Commit Message

Yao Qi Aug. 1, 2016, 9:19 a.m. UTC
  As a result of this commit,

  9b4c5f878ff39e04127a1ad95f6b3832afe6d278
  (Remove support for thread events without PTRACE_EVENT_CLONE in GDBServer.)

the last usage of td_ta_event_addr td_ta_set_event and
td_ta_event_getmsg were removed.  They are no longer used.  This patch
is to remove them.

gdb/gdbserver:

2016-08-01  Yao Qi  <yao.qi@linaro.org>

	* thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
	<td_ta_set_event_p, td_ta_event_addr_p>: Remove.
	(thread_db_load_search): Update.
	(try_thread_db_load_1): Don't look for td_ta_event_addr,
	td_ta_set_event and td_ta_event_getmsg.
---
 gdb/gdbserver/thread-db.c | 9 ---------
 1 file changed, 9 deletions(-)
  

Comments

Gary Benson Aug. 1, 2016, 1:27 p.m. UTC | #1
Hi Yao,

Yao Qi wrote:
> 2016-08-01  Yao Qi  <yao.qi@linaro.org>
> 
> 	* thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
> 	<td_ta_set_event_p, td_ta_event_addr_p>: Remove.
> 	(thread_db_load_search): Update.
> 	(try_thread_db_load_1): Don't look for td_ta_event_addr,
> 	td_ta_set_event and td_ta_event_getmsg.

Not an objection, but... are these still used in GDB native?
I'd really like to merge the two implementations at some point
in the next months.

Cheers,
Gary
  
Yao Qi Aug. 1, 2016, 4:14 p.m. UTC | #2
On Mon, Aug 1, 2016 at 2:27 PM, Gary Benson <gbenson@redhat.com> wrote:
> Hi Yao,
>
> Yao Qi wrote:
>> 2016-08-01  Yao Qi  <yao.qi@linaro.org>
>>
>>       * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
>>       <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
>>       (thread_db_load_search): Update.
>>       (try_thread_db_load_1): Don't look for td_ta_event_addr,
>>       td_ta_set_event and td_ta_event_getmsg.
>
> Not an objection, but... are these still used in GDB native?

No, they were removed in
https://sourceware.org/ml/gdb-patches/2015-12/msg00192.html

> I'd really like to merge the two implementations at some point
> in the next months.
  
Gary Benson Aug. 2, 2016, 11:17 a.m. UTC | #3
Yao Qi wrote:
> On Mon, Aug 1, 2016 at 2:27 PM, Gary Benson <gbenson@redhat.com> wrote:
> > Yao Qi wrote:
> > > 2016-08-01  Yao Qi  <yao.qi@linaro.org>
> > >
> > >       * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
> > >       <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
> > >       (thread_db_load_search): Update.
> > >       (try_thread_db_load_1): Don't look for td_ta_event_addr,
> > >       td_ta_set_event and td_ta_event_getmsg.
> >
> > Not an objection, but... are these still used in GDB native?
> 
> No, they were removed in
> https://sourceware.org/ml/gdb-patches/2015-12/msg00192.html

Awesome.

Cheers,
Gary
  
Yao Qi Aug. 2, 2016, 3:07 p.m. UTC | #4
On Tue, Aug 2, 2016 at 12:17 PM, Gary Benson <gbenson@redhat.com> wrote:
>> No, they were removed in
>> https://sourceware.org/ml/gdb-patches/2015-12/msg00192.html
>
> Awesome.
>

I pushed it in to master.
  

Patch

diff --git a/gdb/gdbserver/thread-db.c b/gdb/gdbserver/thread-db.c
index 185b8ed..0222bfc 100644
--- a/gdb/gdbserver/thread-db.c
+++ b/gdb/gdbserver/thread-db.c
@@ -56,9 +56,6 @@  struct thread_db
 
   /* Addresses of libthread_db functions.  */
   td_ta_new_ftype *td_ta_new_p;
-  td_ta_event_getmsg_ftype * td_ta_event_getmsg_p;
-  td_ta_set_event_ftype *td_ta_set_event_p;
-  td_ta_event_addr_ftype *td_ta_event_addr_p;
   td_ta_map_lwp2thr_ftype *td_ta_map_lwp2thr_p;
   td_thr_get_info_ftype *td_thr_get_info_p;
   td_ta_thr_iter_ftype *td_ta_thr_iter_p;
@@ -475,9 +472,6 @@  thread_db_load_search (void)
   tdb->td_symbol_list_p = &td_symbol_list;
 
   /* These are not essential.  */
-  tdb->td_ta_event_addr_p = &td_ta_event_addr;
-  tdb->td_ta_set_event_p = &td_ta_set_event;
-  tdb->td_ta_event_getmsg_p = &td_ta_event_getmsg;
   tdb->td_thr_tls_get_addr_p = &td_thr_tls_get_addr;
   tdb->td_thr_tlsbase_p = &td_thr_tlsbase;
 
@@ -542,9 +536,6 @@  try_thread_db_load_1 (void *handle)
   CHK (1, TDB_DLSYM (tdb, td_symbol_list));
 
   /* These are not essential.  */
-  CHK (0, TDB_DLSYM (tdb, td_ta_event_addr));
-  CHK (0, TDB_DLSYM (tdb, td_ta_set_event));
-  CHK (0, TDB_DLSYM (tdb, td_ta_event_getmsg));
   CHK (0, TDB_DLSYM (tdb, td_thr_tls_get_addr));
   CHK (0, TDB_DLSYM (tdb, td_thr_tlsbase));