Date: Mon, 02 Nov 2020 17:43:51 +0000 From: bugzilla-noreply@freebsd.org To: toolchain@FreeBSD.org Subject: [Bug 241773] lldb does not display external variables properly. Message-ID: <bug-241773-29464-M3U4PC4gwG@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-241773-29464@https.bugs.freebsd.org/bugzilla/> References: <bug-241773-29464@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D241773 --- Comment #6 from Ed Maste <emaste@freebsd.org> --- 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.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-241773-29464-M3U4PC4gwG>