From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 114968 invoked by alias); 13 Sep 2016 09:05:34 -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 114932 invoked by uid 89); 13 Sep 2016 09:05:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=Reading, AIX, bos, aix X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0a-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.156.1) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 13 Sep 2016 09:05:31 +0000 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id u8D93BL1112579 for ; Tue, 13 Sep 2016 05:05:29 -0400 Received: from e28smtp09.in.ibm.com (e28smtp09.in.ibm.com [125.16.236.9]) by mx0a-001b2d01.pphosted.com with ESMTP id 25dxu446v8-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 13 Sep 2016 05:05:29 -0400 Received: from localhost by e28smtp09.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 13 Sep 2016 14:35:26 +0530 Received: from d28dlp01.in.ibm.com (9.184.220.126) by e28smtp09.in.ibm.com (192.168.1.139) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 13 Sep 2016 14:35:24 +0530 X-IBM-Helo: d28dlp01.in.ibm.com X-IBM-MailFrom: sangamesh.swamy@in.ibm.com X-IBM-RcptTo: gdb-patches@sourceware.org Received: from d28relay03.in.ibm.com (d28relay03.in.ibm.com [9.184.220.60]) by d28dlp01.in.ibm.com (Postfix) with ESMTP id 639F7E006E for ; Tue, 13 Sep 2016 14:33:58 +0530 (IST) Received: from d50lp32.co.us.ibm.com (d50lp32.boulder.ibm.com [9.17.249.36]) by d28relay03.in.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u8D94fso26017860 for ; Tue, 13 Sep 2016 14:34:42 +0530 Received: from localhost by d50lp32.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 13 Sep 2016 03:04:41 -0600 Received: from smtp.notes.na.collabserv.com (192.155.248.90) by d50lp32.co.us.ibm.com (192.168.2.143) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128/128) Tue, 13 Sep 2016 03:04:39 -0600 X-IBM-Helo: smtp.notes.na.collabserv.com X-IBM-MailFrom: sangamesh.swamy@in.ibm.com X-IBM-RcptTo: gdb-patches@sourceware.org Received: from localhost by smtp.notes.na.collabserv.com with smtp.notes.na.collabserv.com ESMTP for from ; Tue, 13 Sep 2016 09:04:38 -0000 Received: from us1a3-smtp05.a3.dal06.isc4sb.com (10.146.71.159) by smtp.notes.na.collabserv.com (10.106.227.141) with smtp.notes.na.collabserv.com ESMTP; Tue, 13 Sep 2016 09:04:35 -0000 X-IBM-Helo: us1a3-smtp05.a3.dal06.isc4sb.com X-IBM-MailFrom: sangamesh.swamy@in.ibm.com X-IBM-RcptTo: gdb-patches@sourceware.org Received: from us1a3-mail142.a3.dal06.isc4sb.com ([10.146.38.78]) by us1a3-smtp05.a3.dal06.isc4sb.com with ESMTP id 2016091309043555-99308 ; Tue, 13 Sep 2016 09:04:35 +0000 To: gdb-patches@sourceware.org Subject: set sysroot command on AIX has no effect. From: "Sangamesh Mallayya" Date: Tue, 13 Sep 2016 09:05:00 -0000 MIME-Version: 1.0 X-KeepSent: BAE0EEF6:511F8BA2-6525802D:00305F69; type=4; name=$KeepSent X-LLNOutbound: False X-Disclaimed: 48767 X-TNEFEvaluated: 1 Content-Type: multipart/mixed; boundary="=_mixed 0031DA2C6525802D_=" x-cbid: 16091309-0060-0000-0000-0000013105C2 X-IBM-ISS-SpamDetectors: Score=0.415652; BY=0; FL=0; FP=0; FZ=0; HX=0; KW=0; PH=0; SC=0.415652; ST=0; TS=0; UL=0; ISC= X-IBM-ISS-DetailInfo: BY=3.00005753; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000185; SDB=6.00757164; UDB=6.00358996; UTC=2016-09-13 09:04:36 x-cbparentid: 16091309-9718-0000-0000-000000F45A1C 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-13_05:,, 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-1609130134 X-SW-Source: 2016-09/txt/msg00094.txt.bz2 --=_mixed 0031DA2C6525802D_= Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="US-ASCII" Content-length: 4091 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. Thanks & Regards, -Sangamesh AIX BOS Development --=_mixed 0031DA2C6525802D_= Content-Type: application/octet-stream; name="ChangeLog" Content-Disposition: attachment; filename="ChangeLog" Content-Transfer-Encoding: base64 Content-length: 163 CSpzb2xpYi1haXguYyAoc29saWJfYWl4X2JmZF9vcGVuKTogUmVjb2duaXNl IHN5c3Jvb3QgcGF0aCBpZiBhIHByb2dyYW0gb24gQUlYCgkgcmVxdWlyZXMg c2hhcmVkIGxpYnJhcnkgYXJjaGl2ZXMgKC5hKS4K --=_mixed 0031DA2C6525802D_= Content-Type: application/octet-stream; name="set_sysroot.patch" Content-Disposition: attachment; filename="set_sysroot.patch" Content-Transfer-Encoding: base64 Content-length: 1623 LS0tIC4vZ2RiL3NvbGliLWFpeC5jLnN5c3Jvb3QgICAyMDE2LTAyLTA5IDIx OjE5OjM5LjAwMDAwMDAwMCAtMDYwMAorKysgLi9nZGIvc29saWItYWl4LmMg ICAyMDE2LTA5LTEzIDAyOjIxOjIyLjAwMDAwMDAwMCAtMDU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