From owner-freebsd-ppc@freebsd.org Fri Jan 25 08:16:26 2019 Return-Path: Delivered-To: freebsd-ppc@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1694314AC55F for ; Fri, 25 Jan 2019 08:16:26 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic307-10.consmr.mail.ne1.yahoo.com (sonic307-10.consmr.mail.ne1.yahoo.com [66.163.190.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B2636F06E for ; Fri, 25 Jan 2019 08:16:24 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: tFEKTRMVM1k40I3CbUSSlMA1LY3VejVHmNemYJ7hg1NysFQesAtMYsw_TJAICiN NhJski8WMqiuAs7.skqmOK0f3VeIr3r5_jAlIdakedaUm0SoQCE0KlXTvY4rDlizN.7xhsOLFsZp vBtyFpL93GN0dw_qgOPbg.bMe3pVag08W0GXLJD67rB7GIYrAnCZS_uA0rT4aLGyUlXXpCTIjaOx SgXi4SQ8D90vIFOak5Ry7yRlraw3cGyHuqgPBmX9g3DZWzcZ7zEPYs4O11W2EGW1mvQhwDIbRjH8 JZaejhzzjaM2qKcShBWq6v.s8QCMxFbJmck1rCBUaYEDDkDJZjpvrV7tLJ61ExbQgEIE.80XttHT mUf3.teeEoATJV7Zp7O5Bj7U0_FMWM_rtY8v3AxNTlwmlcfi59.URpvdbpf666Vr2VE3ei_5h304 Gha1prVFnhIGi9uY1cwK6n806NhmpRboSWq4_VrL4rrigHGSYR5zXvhXKjRtuKDxlyu94ZSv9hva PttT0_aWOfzoGUlLeTaAfdI_m5RvZti6d1JztuynhVhdAtqK2EPTeAflOs13_NJZ0dLGiPV1mM5b Znmq_.KCSiKTWD9tTRaErSL2cdOR.5sZLWywWzY0h0pSUsC6kr3Xynqfe1fwbnBMe0acy9RL40vz QX_cdXmWSbX5b3QcNU3AMECMwhYa3OsyQOi7lXnzNavEH2VcryJAo7NXhzwx6aNG7l.n443sf7kw _KnksiJtVgo43x8z4JES0eZIgutqIIyYAnz1Xq0u6rgOSsunjYj4Xk6iDY3AzD2qqlzAb3sDGFBm JgmWYZBfaSQDXqGiDxxGXVdhmTg5192LosuaMfV28tVkbMY0tFCuE6FnHK2jV0gjD1p53Rgg0qx2 ZY3j9kX4isRBF.2_vC_uk_q0FztrTW5_H1fGub4m1kvwX_fdsrpC8dev2vkH25vWZmeZQ_YJd7yJ EMjimyUR4vIP_UjakASvKeCZbq2FIc.IfhYi0uDJbs2g8G8AP8MJlM50WpyuQQaaG1HIAAjIdV0y s9IbgkFIWZ6AJZrspIyUdBxSU_Lt1PU2oHxnVA0C1kP5PRkTSPadpKNxvRtmVmenKGRiA Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.ne1.yahoo.com with HTTP; Fri, 25 Jan 2019 08:16:22 +0000 Received: from c-67-170-167-181.hsd1.or.comcast.net (EHLO [192.168.1.113]) ([67.170.167.181]) by smtp407.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 59793d69934932d4d395014b4e8ab167; Fri, 25 Jan 2019 08:06:11 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\)) Subject: Re: GDB TLS testing [actually running some tests finally: a success with -pthread used] From: Mark Millard In-Reply-To: <0C2BB5BF-F133-4D23-8462-E015CDAC21C7@yahoo.com> Date: Fri, 25 Jan 2019 00:06:09 -0800 Cc: "freebsd-ppc@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <19343397-859C-4629-A4A5-B0DCDE25957B@yahoo.com> <5AA68ED2-2615-438B-A6AE-406CBD8E49F7@yahoo.com> <20027C29-0093-4001-A135-23783F8B87F3@yahoo.com> <4048D2A4-7E14-481C-9B5D-00567BCF4463@yahoo.com> <2AAC9738-73BD-475A-888A-252EE853A5C6@yahoo.com> <493AC0BE-3EC6-42B7-B027-FFB6454761B5@yahoo.com> <52E66D9B-C332-4565-B8E7-F54F6454B062@yahoo.com> <20B92DA0-33B7-44D1-AB92-E3DD55A8B7CE@yahoo.com> <0C2BB5BF-F133-4D23-8462-E015CDAC21C7@yahoo.com> To: John Baldwin X-Mailer: Apple Mail (2.3445.102.3) X-Rspamd-Queue-Id: 3B2636F06E X-Spamd-Bar: ++++++++ X-Spamd-Result: default: False [8.61 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(0.00)[+ptr:yahoo.com]; MV_CASE(0.50)[]; FREEMAIL_FROM(0.00)[yahoo.com]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[yahoo.com:+]; MX_GOOD(-0.01)[cached: mta6.am0.yahoodns.net]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(0.00)[yahoo.com,reject]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36646, ipnet:66.163.184.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; R_DKIM_ALLOW(0.00)[yahoo.com:s=s2048]; RBL_NIXSPAM(4.00)[33.190.163.66.ix.dnsbl.manitu.net]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.81)[0.814,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(1.31)[ip: (4.67), ipnet: 66.163.184.0/21(1.09), asn: 36646(0.87), country: US(-0.08)]; NEURAL_SPAM_MEDIUM(0.99)[0.993,0]; BAD_REP_POLICIES(0.10)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(1.00)[0.999,0]; RCVD_IN_DNSWL_NONE(0.00)[33.190.163.66.list.dnswl.org : 127.0.5.0]; GREYLIST(0.00)[pass,body] X-Spam: Yes X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jan 2019 08:16:26 -0000 On 2019-Jan-23, at 13:46, Mark Millard wrote: > On 2019-Jan-23, at 10:43, John Baldwin wrote: >=20 >> On 1/23/19 10:10 AM, Mark Millard wrote: >>>=20 >>>=20 >>> On 2019-Jan-23, at 09:59, Mark Millard wrote: >>>=20 >>>=20 >>>=20 >>>> On 2019-Jan-23, at 09:02, John Baldwin wrote: >>>>=20 >>>>>> . . . >>>>>=20 >>>>> Yes. The second one only works for programs linked against -lthr. = Otherwise >>>>> you need to have built your system with debug symbols (which is = the default), >>>>> and gdb needs to be able to access = /usr/lib/debug/libexec/ld-elf.so.1.debug >>>>> to determine the offsets of the two fields in Obj_Entry (this is = what the >>>>> first TRY clause does). >>>>=20 >>>> I buildworld buildkernel with debug symbols for both and install = them: >>>>=20 >>>> # ls -lT /usr/lib/debug/libexec/ld-elf.so.1.debug >>>> -r--r--r-- 1 root wheel 576344 Dec 11 22:58:11 2018 = /usr/lib/debug/libexec/ld-elf.so.1.debug >>>>=20 >>>> # ls -lT /usr/libexec/ld-elf.so.1 /libexec/ld-elf.so.1 >>>> -r-xr-xr-x 1 root wheel 184400 Dec 9 02:35:05 2018 = /libexec/ld-elf.so.1 >>>> lrwxr-xr-x 1 root wheel 25 Dec 11 22:58:12 2018 = /usr/libexec/ld-elf.so.1 -> ../../libexec/ld-elf.so.1 >>>>=20 >>>> So I think the first TRY clause does not work. >>>>=20 >>>> In the tested gdb used on the a.out I'm testing I get: >>>>=20 >>>> (gdb) p &((Obj_Entry *)0)->linkmap >>>> No symbol "Obj_Entry" in current context. >>>>=20 >>>> gdb does not report reading symbols from or for: >>>>=20 >>>> /usr/lib/debug/libexec/ld-elf.so.1.debug >>>> or: >>>> /usr/libexec/ld-elf.so.1 >>>> or: >>>> /libexec/ld-elf.so.1 >>>>=20 >>>> It only reports reading them from/for the a.out . >>>=20 >>> It neded up that I had a littel time so . . . >>>=20 >>> I tried /usr/local/bin/gdb and for it: >>>=20 >>> (gdb) p &((Obj_Entry *)0)->linkmap >>> $1 =3D (struct link_map *) 0x238 >>>=20 >>> So the lack of finding Obj_Entry via the test gdb seems to be >>> specific to the test gdb, not a problem for devel/gdb . >>>=20 >>> May be the test gdb has some sort of build problem in my context, >>> given that I used CPATH to get things to build? >>=20 >> Oh, it might not have /usr/lib/debug configured as a debug directory. = I >> usually use a wrapper script (available at = github/bsdjhb/kdbg.git/gdb/build) >> which sets various configure options to match what the port does. = One of >> those is --with-separate-debug-dir=3D/usr/lib/debug which will = probably fix >> this. >=20 > The script does things not matching how I'm working but gives me a > reference for what you do. >=20 > So initally I'm trying: >=20 > # git clean -f > # rm */config.cache */*/config.cache > # env CPATH=3D/usr/local/include ./configure = --with-separate-debug-dir=3D/usr/lib/debug > . . . > # env CPATH=3D/usr/local/include gmake > . . . >=20 This was sufficient for making the case of a lack of -pthread also "p id" and "p &id" in gdb correctly in for the test program from the original list message in my powerpc64 context. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)