From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 66180 invoked by alias); 27 Sep 2016 10:24:29 -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 64315 invoked by uid 89); 27 Sep 2016 10:24:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,RCVD_IN_SEMBACKSCATTER,SPF_PASS autolearn=ham version=3.3.2 spammy=H*x:Release, H*UA:Release, India, india 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; Tue, 27 Sep 2016 10:24:11 +0000 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id u8RAMtFl004482 for ; Tue, 27 Sep 2016 06:24:09 -0400 Received: from e28smtp06.in.ibm.com (e28smtp06.in.ibm.com [125.16.236.6]) by mx0a-001b2d01.pphosted.com with ESMTP id 25qjpnbkbp-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 27 Sep 2016 06:24:09 -0400 Received: from localhost by e28smtp06.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 27 Sep 2016 15:54:05 +0530 Received: from d28dlp03.in.ibm.com (9.184.220.128) by e28smtp06.in.ibm.com (192.168.1.136) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 27 Sep 2016 15:54:03 +0530 X-IBM-Helo: d28dlp03.in.ibm.com X-IBM-MailFrom: sangamesh.swamy@in.ibm.com X-IBM-RcptTo: gdb-patches@sourceware.org Received: from d28relay10.in.ibm.com (d28relay10.in.ibm.com [9.184.220.161]) by d28dlp03.in.ibm.com (Postfix) with ESMTP id 2BAC71258026 for ; Tue, 27 Sep 2016 15:54:24 +0530 (IST) Received: from d50lp01.ny.us.ibm.com ([146.89.104.207]) by d28relay10.in.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u8RANon717629196 for ; Tue, 27 Sep 2016 15:53:51 +0530 Received: from localhost by d50lp01.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 27 Sep 2016 06:24:00 -0400 Received: from smtp.notes.na.collabserv.com (192.155.248.90) by d50lp01.ny.us.ibm.com (158.87.18.20) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128/128) Tue, 27 Sep 2016 06:23:58 -0400 Received: from localhost by smtp.notes.na.collabserv.com with smtp.notes.na.collabserv.com ESMTP for from ; Tue, 27 Sep 2016 10:23:57 -0000 Received: from us1a3-smtp02.a3.dal06.isc4sb.com (10.106.154.159) by smtp.notes.na.collabserv.com (10.106.227.141) with smtp.notes.na.collabserv.com ESMTP; Tue, 27 Sep 2016 10:23:56 -0000 Received: from us1a3-mail142.a3.dal06.isc4sb.com ([10.146.38.78]) by us1a3-smtp02.a3.dal06.isc4sb.com with ESMTP id 2016092710235573-706345 ; Tue, 27 Sep 2016 10:23:55 +0000 In-Reply-To: To: gdb-patches@sourceware.org Subject: Re: set sysroot command on AIX has no effect. From: "Sangamesh Mallayya" Date: Tue, 27 Sep 2016 11:39:00 -0000 References: MIME-Version: 1.0 X-KeepSent: 5F1DC4DF:51665DEE-6525803B:00390F44; type=4; name=$KeepSent X-LLNOutbound: False X-Disclaimed: 33203 X-TNEFEvaluated: 1 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="US-ASCII" x-cbid: 16092710-8505-0000-0000-000000279C85 X-IBM-ISS-SpamDetectors: Score=0.40962; BY=0; FL=0; FP=0; FZ=0; HX=0; KW=0; PH=0; SC=0.40962; ST=0; TS=0; UL=0; ISC= X-IBM-ISS-DetailInfo: BY=3.00005816; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000185; SDB=6.00761811; UDB=6.00362942; UTC=2016-09-27 10:23:57 x-cbparentid: 16092710-9718-0000-0000-00000128EB41 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused X-Content-Scanned: Fidelis XPS MAILER X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-09-27_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609020000 definitions=main-1609270191 X-SW-Source: 2016-09/txt/msg00363.txt.bz2 Hi, Please review the attached patch and let me know the comments. Thanks & Regards, -Sangamesh AIX BOS Development From: Sangamesh Mallayya/India/IBM To: gdb-patches@sourceware.org Date: 09/13/2016 02:34 PM Subject: set sysroot command on AIX has no effect. set sysroot command on AIX has no effect if a program depends on shared=20 library archives (.a). This is the original behaviour if we use "set sysroot" command. (gdb) set sysroot /tmp warning: while parsing aix library list: no element found (gdb) file /home/sysroot/testApp Reading symbols from /home/sysroot/testApp...done. (gdb) core-file /home/sysroot/core warning: core file may not match specified executable file. warning: Unexpected size of section `.reg' in core file. warning: Could not open `/home/sysroot/libTest.a' as an executable file: A= =20 file or directory in the path name does not exist. warning: Could not load shared library symbols for=20 /home/sysroot/libTest.a(func.o). Do you need "set solib-search-path" or "set sysroot"? Program terminated with signal SIGABRT, Aborted. warning: Unexpected size of section `.reg' in core file. #0 0xd013a820 in raise () from /usr/lib/libc.a(shr.o) (gdb) info sharedlibrary=20 =46rom To Syms Read Shared Object Library 0xd04da240 0xd04daa3e Yes (*) /usr/lib/libcrypt.a(shr.o) No /home/sysroot/libTest.a(func.o) 0xd010c880 0xd049b13d Yes (*) /usr/lib/libc.a(shr.o) (*): Shared library is missing debugging information. (gdb) bt #0 0xd013a820 in raise () from /usr/lib/libc.a(shr.o) #1 0xd01b3088 in abort () from /usr/lib/libc.a(shr.o) #2 0xd2fd82a4 in ?? () #3 0x100003a4 in main () at main.c:8 (gdb)=20 =20 After applying the attached patch. Patch doesn't cause any change in original behaviour while handling shared= =20 library with .so names. ".a" name archives case. (gdb) set sysroot /tmp=20 warning: while parsing aix library list: no element found (gdb) file /home/sysroot/testApp=20 Reading symbols from /home/sysroot/testApp...done. (gdb) core-file /home/sysroot/core warning: core file may not match specified executable file. warning: Unexpected size of section `.reg' in core file. Program terminated with signal SIGABRT, Aborted. warning: Unexpected size of section `.reg' in core file. #0 0xd013a820 in raise () from /tmp/usr/lib/libc.a(shr.o) (gdb) inf sharedlibrary=20 =46rom To Syms Read Shared Object Library 0xd04da240 0xd04daa3e Yes (*) /tmp/usr/lib/libcrypt.a(shr.o) 0xd2fd6250 0xd2fd64aa Yes /tmp/home/sysroot/libTest.a(func.o) 0xd010c880 0xd049b13d Yes (*) /tmp/usr/lib/libc.a(shr.o) (*): Shared library is missing debugging information. (gdb) bt #0 0xd013a820 in raise () from /tmp/usr/lib/libc.a(shr.o) #1 0xd01b3088 in abort () from /tmp/usr/lib/libc.a(shr.o) #2 0xd2fd6364 in func () from /tmp/home/sysroot/libTest.a(func.o) #3 0x100003a4 in main () at main.c:8 (gdb)=20 .a & .so library names (gdb) set sysroot /tmp warning: while parsing aix library list: no element found (gdb) file /home/sysroot/testApp=20 Reading symbols from /home/sysroot/testApp...done. (gdb) core-file /home/sysroot/core warning: core file may not match specified executable file. warning: Unexpected size of section `.reg' in core file. Program terminated with signal SIGABRT, Aborted. warning: Unexpected size of section `.reg' in core file. #0 0xd013a820 in raise () from /tmp/usr/lib/libc.a(shr.o) (gdb) info sharedlibrary=20 =46rom To Syms Read Shared Object Library 0xd04da240 0xd04daa3e Yes (*) /tmp/usr/lib/libcrypt.a(shr.o) 0xd2536250 0xd25499fc Yes=20 /tmp/opt/freeware/lib/gcc/powerpc-ibm-aix6.1.0.0/4.8.5/libgcc_s.a(shr.o) 0xd0566c80 0xd0566db6 Yes (*) /tmp/usr/lib/librtl.a(shr.o) 0xd010c880 0xd049b13d Yes (*) /tmp/usr/lib/libc.a(shr.o) 0xd2fd7150 0xd2fd78e1 Yes /tmp/home/sysroot/libTest.so (*): Shared library is missing debugging information. (gdb) bt #0 0xd013a820 in raise () from /tmp/usr/lib/libc.a(shr.o) #1 0xd01b3088 in abort () from /tmp/usr/lib/libc.a(shr.o) #2 0xd2fd749c in func () from /tmp/home/sysroot/libTest.so #3 0x100003fc in main () at main.c:8 (gdb) Please review and let me know the comments. [attachment "ChangeLog" deleted by Sangamesh Mallayya/India/IBM]=20 [attachment "set_sysroot.patch" deleted by Sangamesh Mallayya/India/IBM]=20 Thanks & Regards, -Sangamesh AIX BOS Development