From 10e86dd77848e00024b5de420c18e13db9a103c9 Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Mon, 21 Dec 2009 20:52:53 +0000 Subject: * configure.ac: Check for dladdr. * config.in: Regenerate. * configure: Regenerate. * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR. (try_thread_db_load): Update. --- gdb/gdbserver/thread-db.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gdb/gdbserver/thread-db.c') diff --git a/gdb/gdbserver/thread-db.c b/gdb/gdbserver/thread-db.c index f273082..e169a50 100644 --- a/gdb/gdbserver/thread-db.c +++ b/gdb/gdbserver/thread-db.c @@ -596,6 +596,8 @@ try_thread_db_load_1 (void *handle) return 1; } +#ifdef HAVE_DLADDR + /* Lookup a library in which given symbol resides. Note: this is looking in the GDBSERVER process, not in the inferior. Returns library name, or NULL. */ @@ -610,6 +612,8 @@ dladdr_to_soname (const void *addr) return NULL; } +#endif + static int try_thread_db_load (const char *library) { @@ -626,6 +630,7 @@ try_thread_db_load (const char *library) return 0; } +#ifdef HAVE_DLADDR if (debug_threads && strchr (library, '/') == NULL) { void *td_init; @@ -640,6 +645,7 @@ try_thread_db_load (const char *library) library, libpath); } } +#endif if (try_thread_db_load_1 (handle)) return 1; -- cgit v1.1