gdb: Add missing #ifdef USE_THREAD_DB to gdbserver
authorJames Clarke <jrtc27@jrtc27.com>
Fri, 19 Jan 2018 17:22:50 +0000 (17:22 +0000)
committerPedro Alves <palves@redhat.com>
Fri, 19 Jan 2018 18:18:58 +0000 (18:18 +0000)
Otherwise, linking fails with:

  [...]/linux-low.c:664: undefined reference to `thread_db_notice_clone(thread_info*, ptid_t)'

gdb/gdbserver/ChangeLog:

* linux-low.c (handle_extended_wait): Surround call to
thread_db_notice_clone with #ifdef USE_THREAD_DB.

gdb/gdbserver/ChangeLog
gdb/gdbserver/linux-low.c

index f18365595391fe0b68350d5e830d1817ef126607..877b6e6226a19bbe2e536c91c1cd5348893e7ce5 100644 (file)
@@ -1,3 +1,8 @@
+2018-01-19  James Clarke  <jrtc27@jrtc27.com>
+
+       * linux-low.c (handle_extended_wait): Surround call to
+       thread_db_notice_clone with #ifdef USE_THREAD_DB.
+
 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
 
        * linux-low.c (attach_proc_task_lwp_callback): Adjust to
index 8117fc6ca8b0596cc56745c87b5aaffdc688eb5c..38142bba03d2b707fdd1f6d8341a5d18e4a0199d 100644 (file)
@@ -661,7 +661,9 @@ handle_extended_wait (struct lwp_info **orig_event_lwp, int wstat)
          new_lwp->status_pending = status;
        }
 
+#ifdef USE_THREAD_DB
       thread_db_notice_clone (event_thr, ptid);
+#endif
 
       /* Don't report the event.  */
       return 1;