From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14191 invoked by alias); 21 Sep 2012 12:36:22 -0000 Received: (qmail 13901 invoked by uid 22791); 21 Sep 2012 12:36:18 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,TW_PM X-Spam-Check-By: sourceware.org Received: from gbenson.demon.co.uk (HELO gbenson.demon.co.uk) (80.177.220.214) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 21 Sep 2012 12:35:59 +0000 Date: Fri, 21 Sep 2012 12:36:00 -0000 From: Gary Benson To: Jan Kratochvil Cc: gdb-patches@sourceware.org Subject: Re: [RFA 4/4 take 2] Improved linker-debugger interface Message-ID: <20120921123555.GA6449@redhat.com> Mail-Followup-To: Jan Kratochvil , gdb-patches@sourceware.org References: <20120719110518.GE16185@redhat.com> <20120815172346.GA5696@host2.jankratochvil.net> <20120919094933.GA3023@redhat.com> <20120919111422.GA17988@host2.jankratochvil.net> <20120919150622.GA7647@redhat.com> <20120919151255.GA5436@host2.jankratochvil.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="BOKacYhQ+x31HxR3" Content-Disposition: inline In-Reply-To: <20120919151255.GA5436@host2.jankratochvil.net> X-IsSubscribed: yes 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 X-SW-Source: 2012-09/txt/msg00431.txt.bz2 --BOKacYhQ+x31HxR3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 1460 Hi Jan, Jan Kratochvil wrote: > On Wed, 19 Sep 2012 17:06:22 +0200, Gary Benson wrote: > > I also see "warning: Can not parse XML target description; XML > > support was disabled at compile time", is that something to do > > with it? Is there some -devel package I'm missing? > > Yes, on Fedora 'expat-devel'. > > Please rpmbuild -bb --with testsuite gdb.spec > or rpmbuild --rebuild --with testsuite gdb*.src.rpm > to get all the pre-requisites. I'm not having any luck with this. I've installed all the prerequisites except the 32-bit ones: libgnat(x86-32) is needed by gdb-7.3.50.20110722-16.x86_64 glibc-devel(x86-32) is needed by gdb-7.3.50.20110722-16.x86_64 libgcc(x86-32) is needed by gdb-7.3.50.20110722-16.x86_64 libstdc++(x86-32) is needed by gdb-7.3.50.20110722-16.x86_64 libgcj(x86-32) is needed by gdb-7.3.50.20110722-16.x86_64 zlib-devel(x86-32) is needed by gdb-7.3.50.20110722-16.x86_64 valgrind(x86-32) is needed by gdb-7.3.50.20110722-16.x86_64 I've also passed --with-expat to force the issue. I'm not seeing the XML warning any more, but the tests are still using the probes code and not the code from linux-low.c. I've attached a gdb.log (patched with the attached patch) from running: make check RUNTESTFLAGS="--target_board=native-gdbserver gdb.base/break-probes.exp" You can see from the dl_main in there that the probes code is in use. Any idea what I'm doing wrong? Thanks, Gary -- http://gbenson.net/ --BOKacYhQ+x31HxR3 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=patch Content-length: 490 diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c index 5eb84ba..6aef1ea 100644 --- a/gdb/solib-svr4.c +++ b/gdb/solib-svr4.c @@ -1446,8 +1446,14 @@ svr4_current_sos (void) info->main_lm_addr = library_list.main_lm; } + if (library_list.head) + puts_unfiltered ("SVR4:PASS\n"); + else + puts_unfiltered ("SVR4:WHAT?\n"); + return library_list.head ? library_list.head : svr4_default_sos (); } + puts_unfiltered ("SVR4:FAIL\n"); info = get_svr4_info (); --BOKacYhQ+x31HxR3 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="gdb.log" Content-length: 7427 Test Run By gary on Fri Sep 21 13:32:44 2012 Native configuration is x86_64-unknown-linux-gnu === gdb tests === Schedule of variations: native-gdbserver Running target native-gdbserver Using /home/gary/work/gdb/dejagnu/boards/native-gdbserver.exp as board description file for target. Using ../../../src/gdb/testsuite/config/gdbserver.exp as tool-and-target-specific interface file. Running ../../../src/gdb/testsuite/gdb.base/break-probes.exp ... Executing on host: gcc -fPIC -c -o /home/gary/work/gdb/archer-gbenson-stap-rtld-mainline/build/gdb/testsuite/gdb.base/break-probes-solib.c.o ../../../src/gdb/testsuite/gdb.base/break-probes-solib.c (timeout = 300) spawn -ignore SIGHUP gcc -fPIC -c -o /home/gary/work/gdb/archer-gbenson-stap-rtld-mainline/build/gdb/testsuite/gdb.base/break-probes-solib.c.o ../../../src/gdb/testsuite/gdb.base/break-probes-solib.c Executing on host: gcc /home/gary/work/gdb/archer-gbenson-stap-rtld-mainline/build/gdb/testsuite/gdb.base/break-probes-solib.c.o -fPIC -shared -Wl,-soname,break-probes-solib.so -lm -o /home/gary/work/gdb/archer-gbenson-stap-rtld-mainline/build/gdb/testsuite/gdb.base/break-probes-solib.so (timeout = 300) spawn -ignore SIGHUP gcc /home/gary/work/gdb/archer-gbenson-stap-rtld-mainline/build/gdb/testsuite/gdb.base/break-probes-solib.c.o -fPIC -shared -Wl,-soname,break-probes-solib.so -lm -o /home/gary/work/gdb/archer-gbenson-stap-rtld-mainline/build/gdb/testsuite/gdb.base/break-probes-solib.so get_compiler_info: gcc-4-6-3 Executing on host: gcc -DSHLIB_NAME="/home/gary/work/gdb/archer-gbenson-stap-rtld-mainline/build/gdb/testsuite/gdb.base/break-probes-solib.so" -c -o /home/gary/work/gdb/archer-gbenson-stap-rtld-mainline/build/gdb/testsuite/gdb.base/break-probes0.o ../../../src/gdb/testsuite/gdb.base/break-probes.c (timeout = 300) spawn -ignore SIGHUP gcc -DSHLIB_NAME="/home/gary/work/gdb/archer-gbenson-stap-rtld-mainline/build/gdb/testsuite/gdb.base/break-probes-solib.so" -c -o /home/gary/work/gdb/archer-gbenson-stap-rtld-mainline/build/gdb/testsuite/gdb.base/break-probes0.o ../../../src/gdb/testsuite/gdb.base/break-probes.c Executing on host: gcc /home/gary/work/gdb/archer-gbenson-stap-rtld-mainline/build/gdb/testsuite/gdb.base/break-probes0.o -DSHLIB_NAME="/home/gary/work/gdb/archer-gbenson-stap-rtld-mainline/build/gdb/testsuite/gdb.base/break-probes-solib.so" -ldl -lm -o /home/gary/work/gdb/archer-gbenson-stap-rtld-mainline/build/gdb/testsuite/gdb.base/break-probes (timeout = 300) spawn -ignore SIGHUP gcc /home/gary/work/gdb/archer-gbenson-stap-rtld-mainline/build/gdb/testsuite/gdb.base/break-probes0.o -DSHLIB_NAME="/home/gary/work/gdb/archer-gbenson-stap-rtld-mainline/build/gdb/testsuite/gdb.base/break-probes-solib.so" -ldl -lm -o /home/gary/work/gdb/archer-gbenson-stap-rtld-mainline/build/gdb/testsuite/gdb.base/break-probes spawn /home/gary/work/gdb/archer-gbenson-stap-rtld-mainline/build/gdb/testsuite/../../gdb/gdb -nw -nx -data-directory /home/gary/work/gdb/archer-gbenson-stap-rtld-mainline/build/gdb/testsuite/../data-directory GNU gdb (GDB) 7.5.50.20120815-cvs Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-unknown-linux-gnu". For bug reporting instructions, please see: . (gdb) set height 0 (gdb) set width 0 (gdb) dir Reinitialize source path to empty? (y or n) y Source directories searched: $cdir:$cwd (gdb) dir ../../../src/gdb/testsuite/gdb.base Source directories searched: /home/gary/work/gdb/archer-gbenson-stap-rtld-mainline/build/gdb/testsuite/../../../src/gdb/testsuite/gdb.base:$cdir:$cwd (gdb) kill The program is not being run. (gdb) file /home/gary/work/gdb/archer-gbenson-stap-rtld-mainline/build/gdb/testsuite/gdb.base/break-probes Reading symbols from /home/gary/work/gdb/archer-gbenson-stap-rtld-mainline/build/gdb/testsuite/gdb.base/break-probes...(no debugging symbols found)...done. (gdb) set stop-on-solib-events 1 (gdb) PASS: gdb.base/break-probes.exp: set stop-on-solib-events 1 kill The program is not being run. (gdb) spawn ../gdbserver/gdbserver --once :2346 /home/gary/work/gdb/archer-gbenson-stap-rtld-mainline/build/gdb/testsuite/gdb.base/break-probes Process /home/gary/work/gdb/archer-gbenson-stap-rtld-mainline/build/gdb/testsuite/gdb.base/break-probes created; pid = 5308 Listening on port 2346 target remote localhost:2346 Remote debugging using localhost:2346 Remote debugging from host 127.0.0.1 SVR4:WHAT? SVR4:WHAT? Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols found)...done. Loaded symbols for /lib64/ld-linux-x86-64.so.2 0x00000031ce4016e0 in _start () from /lib64/ld-linux-x86-64.so.2 (gdb) continue Continuing. SVR4:PASS Stopped due to shared library event (no libraries added or removed) (gdb) bt #0 0x00000031ce403429 in dl_main () from /lib64/ld-linux-x86-64.so.2 #1 0x00000031ce415814 in _dl_sysdep_start () from /lib64/ld-linux-x86-64.so.2 #2 0x00000031ce4053d5 in _dl_start () from /lib64/ld-linux-x86-64.so.2 #3 0x00000031ce4016e8 in _start () from /lib64/ld-linux-x86-64.so.2 #4 0x0000000000000001 in ?? () #5 0x00007fffffffd85b in ?? () #6 0x0000000000000000 in ?? () (gdb) PASS: gdb.base/break-probes.exp: ensure using probes c Continuing. SVR4:PASS Stopped due to shared library event: Inferior loaded /lib64/libdl.so.2 /lib64/libm.so.6 /lib64/libc.so.6 (gdb) c Continuing. SVR4:PASS Stopped due to shared library event (no libraries added or removed) (gdb) c Continuing. SVR4:PASS Stopped due to shared library event: Inferior loaded /home/gary/work/gdb/archer-gbenson-stap-rtld-mainline/build/gdb/testsuite/gdb.base/break-probes-solib.so (gdb) PASS: gdb.base/break-probes.exp: run til our library loads call foo(23) $1 = 31 (gdb) PASS: gdb.base/break-probes.exp: call foo(23) testcase ../../../src/gdb/testsuite/gdb.base/break-probes.exp completed in 0 seconds === gdb Summary === # of expected passes 4 Executing on host: /home/gary/work/gdb/archer-gbenson-stap-rtld-mainline/build/gdb/testsuite/../../gdb/gdb -nw -nx -data-directory /home/gary/work/gdb/archer-gbenson-stap-rtld-mainline/build/gdb/testsuite/../data-directory --version (timeout = 300) spawn -ignore SIGHUP /home/gary/work/gdb/archer-gbenson-stap-rtld-mainline/build/gdb/testsuite/../../gdb/gdb -nw -nx -data-directory /home/gary/work/gdb/archer-gbenson-stap-rtld-mainline/build/gdb/testsuite/../data-directory --version GNU gdb (GDB) 7.5.50.20120815-cvs Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-unknown-linux-gnu". For bug reporting instructions, please see: . /home/gary/work/gdb/archer-gbenson-stap-rtld-mainline/build/gdb/testsuite/../../gdb/gdb version 7.5.50.20120815-cvs -nw -nx -data-directory /home/gary/work/gdb/archer-gbenson-stap-rtld-mainline/build/gdb/testsuite/../data-directory runtest completed at Fri Sep 21 13:32:44 2012 --BOKacYhQ+x31HxR3--