From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17828 invoked by alias); 29 Sep 2016 15:23:00 -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 17732 invoked by uid 89); 29 Sep 2016 15:23:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RCVD_IN_SEMBACKSCATTER,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0b-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.158.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 29 Sep 2016 15:22:58 +0000 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id u8TFIdxn051951 for ; Thu, 29 Sep 2016 11:22:57 -0400 Received: from e06smtp13.uk.ibm.com (e06smtp13.uk.ibm.com [195.75.94.109]) by mx0b-001b2d01.pphosted.com with ESMTP id 25s3dexqex-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 29 Sep 2016 11:22:56 -0400 Received: from localhost by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 29 Sep 2016 16:22:54 +0100 Received: from d06dlp03.portsmouth.uk.ibm.com (9.149.20.15) by e06smtp13.uk.ibm.com (192.168.101.143) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 29 Sep 2016 16:22:52 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 37FA71B08067 for ; Thu, 29 Sep 2016 16:24:47 +0100 (BST) Received: from d06av01.portsmouth.uk.ibm.com (d06av01.portsmouth.uk.ibm.com [9.149.37.212]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u8TFMpCF17695174 for ; Thu, 29 Sep 2016 15:22:52 GMT Received: from d06av01.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u8TFMpwC020308 for ; Thu, 29 Sep 2016 09:22:51 -0600 Received: from oc8523832656.ibm.com (dyn-9-152-213-24.boeblingen.de.ibm.com [9.152.213.24]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id u8TFMpBM020303; Thu, 29 Sep 2016 09:22:51 -0600 Received: by oc8523832656.ibm.com (Postfix, from userid 500) id 639F511C2C8; Thu, 29 Sep 2016 17:22:51 +0200 (CEST) Subject: Re: set sysroot command on AIX has no effect. To: sangamesh.swamy@in.ibm.com (Sangamesh Mallayya) Date: Thu, 29 Sep 2016 15:33:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org In-Reply-To: from "Sangamesh Mallayya" at Sep 13, 2016 09:04:34 AM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16092915-0012-0000-0000-000004673705 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16092915-0013-0000-0000-000015A13085 Message-Id: <20160929152251.639F511C2C8@oc8523832656.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-09-29_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609020000 definitions=main-1609290268 X-SW-Source: 2016-09/txt/msg00413.txt.bz2 Sangamesh Mallaya wrote: > set sysroot command on AIX has no effect if a program depends on shared > library archives (.a). Yes, that seems a bug. > + /* If gdb_sysroot is set via set sysroot command, > + then we need to prefix gdb_sysroot to shared library path */ > + /* .a shared library archives case */ > + if (gdb_sysroot != NULL && *gdb_sysroot != 0) { > + sys_path = alloca (sizeof(gdb_sysroot)+strlen(pathname)); > + memset (sys_path, 0, sizeof(sys_path)); > + strcpy(sys_path, gdb_sysroot); > + pathname = strcat (sys_path, pathname); > + } > + path_len = strlen (pathname); This duplicates some of the logic in solib_find. It would be better to avoid that duplication ... Is there any reason why you cannot use solib_find / solib_bfd_fopen to open the archive file, like solib_bfd_open does? This would ensure we're always using the same search logic for .a files as for .so files. Bye, Ulrich -- Dr. Ulrich Weigand GNU/Linux compilers and toolchain Ulrich.Weigand@de.ibm.com