Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Gary Benson <gbenson@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA 4/4 take 2] Improved linker-debugger interface
Date: Fri, 21 Sep 2012 12:36:00 -0000	[thread overview]
Message-ID: <20120921123555.GA6449@redhat.com> (raw)
In-Reply-To: <20120919151255.GA5436@host2.jankratochvil.net>

[-- Attachment #1: Type: text/plain, Size: 1460 bytes --]

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/

[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 490 bytes --]

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 ();
 

[-- Attachment #3: gdb.log --]
[-- Type: text/plain, Size: 7427 bytes --]

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 <http://gnu.org/licenses/gpl.html>
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:
<http://www.gnu.org/software/gdb/bugs/>.
(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 <http://gnu.org/licenses/gpl.html>
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:
<http://www.gnu.org/software/gdb/bugs/>.
/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

  reply	other threads:[~2012-09-21 12:36 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-19 11:09 Gary Benson
2012-07-25 19:36 ` Tom Tromey
2012-07-31 12:12   ` Gary Benson
2012-07-31 12:13     ` Gary Benson
2012-08-14 19:49       ` Tom Tromey
2012-08-15 17:24 ` Jan Kratochvil
2012-08-15 17:46   ` Jan Kratochvil
2012-08-16 11:14     ` Gary Benson
2012-08-16 15:52     ` Gary Benson
2012-08-17 10:54       ` Gary Benson
2012-08-17 16:41         ` Jan Kratochvil
2012-09-19  9:49   ` Gary Benson
2012-09-19 11:14     ` Jan Kratochvil
2012-09-19 15:06       ` Gary Benson
2012-09-19 15:13         ` Jan Kratochvil
2012-09-21 12:36           ` Gary Benson [this message]
2012-09-21 14:46             ` Jan Kratochvil
2012-09-28 10:51               ` Gary Benson
2012-09-28 10:58                 ` Jan Kratochvil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120921123555.GA6449@redhat.com \
    --to=gbenson@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox