From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19400 invoked by alias); 16 Apr 2013 18:30:54 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 19384 invoked by uid 89); 16 Apr 2013 18:30:54 -0000 X-Spam-SWARE-Status: No, score=-8.0 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 16 Apr 2013 18:30:53 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3GIUql9025582 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 16 Apr 2013 14:30:52 -0400 Received: from brno.lan (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r3GIUppG018473 for ; Tue, 16 Apr 2013 14:30:51 -0400 Subject: [PATCH 1/6] PR build/11881: LIBTHREAD_DB_SO can be undefined. To: gdb-patches@sourceware.org From: Pedro Alves Date: Wed, 17 Apr 2013 00:55:00 -0000 Message-ID: <20130416183050.540.27315.stgit@brno.lan> In-Reply-To: <20130416183043.540.32214.stgit@brno.lan> References: <20130416183043.540.32214.stgit@brno.lan> User-Agent: StGit/0.16 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-SW-Source: 2013-04/txt/msg00500.txt.bz2 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 Pedro Alves 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 - -#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