Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 1/6] PR build/11881: LIBTHREAD_DB_SO can be undefined.
Date: Wed, 17 Apr 2013 00:55:00 -0000	[thread overview]
Message-ID: <20130416183050.540.27315.stgit@brno.lan> (raw)
In-Reply-To: <20130416183043.540.32214.stgit@brno.lan>

This patch:

 http://sourceware.org/ml/gdb-patches/2009-04/msg00115.html

Changed behaviour by only defining LIBTHREAD_DB_SO if thread_db.h exists. The
definition of LIBTHREAD_DB_SO and LIBTHREAD_DB_SEARCH_PATH should be moved
outside of #ifdef HAVE_THREAD_DB_H.

This is based on a patch attached to the PR, however, it needed a
tweak, as it was it broke the HAVE_THREAD_DB_H path.

2013-04-16  Will Newton  <will.newton@gmail.com>
	    Pedro Alves  <palves@redhat.com>

	PR build/11881

	* common/gdb_thread_db.h (LIBTHREAD_DB_SO)
	(LIBTHREAD_DB_SEARCH_PATH): Move outside of #ifdef
	HAVE_THREAD_DB_H.
---
 gdb/common/gdb_thread_db.h |   23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)

diff --git a/gdb/common/gdb_thread_db.h b/gdb/common/gdb_thread_db.h
index c95aa77..5c6f6cf 100644
--- a/gdb/common/gdb_thread_db.h
+++ b/gdb/common/gdb_thread_db.h
@@ -1,17 +1,5 @@
 #ifdef HAVE_THREAD_DB_H
 #include <thread_db.h>
-
-#ifndef LIBTHREAD_DB_SO
-#define LIBTHREAD_DB_SO "libthread_db.so.1"
-#endif
-
-#ifndef LIBTHREAD_DB_SEARCH_PATH
-/* $sdir appears before $pdir for some minimal security protection:
-   we trust the system libthread_db.so a bit more than some random
-   libthread_db associated with whatever libpthread the app is using.  */
-#define LIBTHREAD_DB_SEARCH_PATH "$sdir:$pdir"
-#endif
-
 #else
 
 /* Copyright (C) 1999-2013 Free Software Foundation, Inc.
@@ -453,3 +441,14 @@ extern td_err_e td_thr_dbresume (const td_thrhandle_t *__th);
 #endif	/* thread_db.h */
 
 #endif /* HAVE_THREAD_DB_H */
+
+#ifndef LIBTHREAD_DB_SO
+#define LIBTHREAD_DB_SO "libthread_db.so.1"
+#endif
+
+#ifndef LIBTHREAD_DB_SEARCH_PATH
+/* $sdir appears before $pdir for some minimal security protection:
+   we trust the system libthread_db.so a bit more than some random
+   libthread_db associated with whatever libpthread the app is using.  */
+#define LIBTHREAD_DB_SEARCH_PATH "$sdir:$pdir"
+#endif


  reply	other threads:[~2013-04-16 18:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-17  0:32 [PATCH 0/6] thread_db.h issues Pedro Alves
2013-04-17  0:55 ` Pedro Alves [this message]
2013-04-17  1:04 ` [PATCH 2/6] Move glibc's fallback thread_db.h to a separate file Pedro Alves
2013-04-17  1:58 ` [PATCH 3/6] Update glibc_thread_db.h from upstream Pedro Alves
2013-04-17  2:42 ` [PATCH 4/6] copyright.py: Don't update glibc_thread_db.h Pedro Alves
2013-04-17  2:54 ` [PATCH 5/6] Fix remaining GDBserver issues with !HAVE_THREAD_DB_H Pedro Alves
2013-04-17  4:56   ` Tom Tromey
2013-04-17 15:54     ` Use AC_DEFINE for USE_THREAD_DB (was: Re: [PATCH 5/6] Fix remaining GDBserver issues with !HAVE_THREAD_DB_H.) Pedro Alves
2013-04-17  2:54 ` [PATCH 6/6] Only define 'struct lwp_info'::thread_known if using libthread-db Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130416183050.540.27315.stgit@brno.lan \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox