From owner-freebsd-toolchain@freebsd.org Mon Nov 2 17:43:51 2020 Return-Path: Delivered-To: freebsd-toolchain@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DD454456BA7 for ; Mon, 2 Nov 2020 17:43:51 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4CQ0dg5gq2z3XJh for ; Mon, 2 Nov 2020 17:43:51 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id C11AD4567E3; Mon, 2 Nov 2020 17:43:51 +0000 (UTC) Delivered-To: toolchain@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C0DE045667C for ; Mon, 2 Nov 2020 17:43:51 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CQ0dg4mr4z3XRm for ; Mon, 2 Nov 2020 17:43:51 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 88C62CB70 for ; Mon, 2 Nov 2020 17:43:51 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 0A2HhpKL019616 for ; Mon, 2 Nov 2020 17:43:51 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 0A2HhpQO019613 for toolchain@FreeBSD.org; Mon, 2 Nov 2020 17:43:51 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: toolchain@FreeBSD.org Subject: [Bug 241773] lldb does not display external variables properly. Date: Mon, 02 Nov 2020 17:43:51 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 12.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: emaste@freebsd.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: toolchain@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2020 17:43:51 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D241773 --- Comment #6 from Ed Maste --- Tried to reproduce on -current with lldb version 11.0.0 (git@github.com:llvm/llvm-project.git revision llvmorg-11.0.0-rc2-0-g414f32a9e86) clang revision llvmorg-11.0.0-rc2-0-g414f32a9e86 llvm revision llvmorg-11.0.0-rc2-0-g414f32a9e86 $ make rm -f testlib.o testlib.so testprog cc -Wall -g -c -fPIC -o testlib.o testlib.c cc -shared -Wl,-export-dynamic -o testlib.so testlib.o cc -Wall -g -o testprog ./testlib.so testprog.c ./testprog sock =3D 5, id =3D aa Size of testlib.c is 311 bytes. id =3D aa sock =3D 5 $ lldb ./testprog (lldb) target create "./testprog" Current executable set to '/home/emaste/bugs/pr241773/testprog' (x86_64). (lldb) b main Breakpoint 1: where =3D testprog`main + 22 at testprog.c:8:2, address =3D 0x0000000000201976 (lldb) run Process 2340 launching Process 2340 launched: '/home/emaste/bugs/pr241773/testprog' (x86_64) Process 2340 stopped * thread #1, name =3D 'testprog', stop reason =3D breakpoint 1.1 frame #0: 0x0000000000201976 testprog`main(argc=3D1, argv=3D0x00007ffff= fffe720) at testprog.c:8:2 5=20=20=20 6 void testfunc(void); 7 int main(int argc, char **argv) { -> 8 testfunc(); 9 printf ("id =3D %s\n", id); 10 printf ("sock =3D %d\n", sock); 11 return 0; (lldb) n sock =3D 5, id =3D aa Size of testlib.c is 311 bytes. Process 2340 stopped * thread #1, name =3D 'testprog', stop reason =3D step over frame #0: 0x000000000020197b testprog`main(argc=3D1, argv=3D0x00007ffff= fffe720) at testprog.c:9:2 6 void testfunc(void); 7 int main(int argc, char **argv) { 8 testfunc(); -> 9 printf ("id =3D %s\n", id); 10 printf ("sock =3D %d\n", sock); 11 return 0; 12 } (lldb) p id (char [4]) $0 =3D "" (lldb) p sock (int) $1 =3D 0 (lldb) c id =3D aa sock =3D 5 Process 2340 resuming Process 2340 exited with status =3D 0 (0x00000000)=20 (lldb) ^D --=20 You are receiving this mail because: You are the assignee for the bug.=