[v2,2/2] gdb: Add missing #ifdef USE_THREAD_DB to gdbserver

Message ID 20180119172250.91520-2-jrtc27@jrtc27.com
State New, archived
Headers

Commit Message

Jessica Clarke Jan. 19, 2018, 5:22 p.m. UTC
  gdb/ChangeLog:
	* gdbserver/linux-low.c (handle_extended_wait): Surround call to
	thread_db_notice_clone with #ifdef USE_THREAD_DB, otherwise
	linking fails with "undefined reference to
	`thread_db_notice_clone(thread_info*, ptid_t)'" on architectures
	without thread_db.
---
 gdb/gdbserver/linux-low.c | 2 ++
 1 file changed, 2 insertions(+)
  

Patch

diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index f6a52d5..398cd70 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -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;