From: Andrew Cagney <cagney@gnu.org>
To: Michael Snyder <msnyder@redhat.com>
Cc: Andrew Cagney <ac131313@redhat.com>, gdb-patches@sources.redhat.com
Subject: Re: [rfa/gdb.threads] Test static thread program
Date: Fri, 27 Aug 2004 14:49:00 -0000 [thread overview]
Message-ID: <412F49A7.3080302@gnu.org> (raw)
In-Reply-To: <412EA2E7.3030608@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 513 bytes --]
> Andrew Cagney wrote:
>
>>> I really really appreciate the contribution of a static thread test.
>>> I'd like to know what specific failure mode(s) you're looking for.
>>
>>
>>
>> GDB's thread debugging does not work on GNU/Linux when the program is linked statically.
>
>
> Well yes, I guessed that much. Can you be more specific?
Bug 1328 contains all the information I know, which at present isn't
much (I'm guessing that it is missing a thread library loaded event).
I've attached a gdb.log.
Andrew
[-- Attachment #2: gdb.log --]
[-- Type: text/plain, Size: 5525 bytes --]
Test Run By cagney on Fri Aug 27 10:34:37 2004
Native configuration is i686-pc-linux-gnu
=== gdb tests ===
Schedule of variations:
unix
Running target unix
Using /home/cygnus/cagney/PENDING/rh-th-static/src/gdb/testsuite/../../dejagnu/baseboards/unix.exp as board description file for target.
Using /home/cygnus/cagney/PENDING/rh-th-static/src/gdb/testsuite/../../dejagnu/config/unix.exp as generic interface file for target.
Using /home/cygnus/cagney/PENDING/rh-th-static/src/gdb/testsuite/config/unix.exp as tool-and-target-specific interface file.
Running /home/cygnus/cagney/PENDING/rh-th-static/src/gdb/testsuite/gdb.threads/staticthreads.exp ...
Executing on host: gcc /home/cygnus/cagney/PENDING/rh-th-static/src/gdb/testsuite/gdb.threads/staticthreads.c -I/home/cagney/PENDING/rh-th-static/N-tourist-i686-pc-linux-gnu/gdb/testsuite -static -g -lpthreads -lm -o /home/cagney/PENDING/rh-th-static/N-tourist-i686-pc-linux-gnu/gdb/testsuite/gdb.threads/staticthreads (timeout = 300)
/usr/bin/ld: cannot find -lpthreads
collect2: ld returned 1 exit status
compiler exited with status 1
output is:
/usr/bin/ld: cannot find -lpthreads
collect2: ld returned 1 exit status
Executing on host: gcc /home/cygnus/cagney/PENDING/rh-th-static/src/gdb/testsuite/gdb.threads/staticthreads.c -I/home/cagney/PENDING/rh-th-static/N-tourist-i686-pc-linux-gnu/gdb/testsuite -static -g -lpthread -lm -o /home/cagney/PENDING/rh-th-static/N-tourist-i686-pc-linux-gnu/gdb/testsuite/gdb.threads/staticthreads (timeout = 300)
PASS: gdb.threads/staticthreads.exp: successfully compiled posix threads test case
GNU gdb 2004-08-12-cvs
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu".
(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 /home/cygnus/cagney/PENDING/rh-th-static/src/gdb/testsuite/gdb.threads
^[[A
(gdb) dir /home/cygnus/cagney/PENDING/rh-th-static/src/gdb/testsuite/gdb.thread^[[Ks
Source directories searched: /home/cygnus/cagney/PENDING/rh-th-static/src/gdb/testsuite/gdb.threads:$cdir:$cwd
(gdb) file /home/cagney/PENDING/rh-th-static/N-tourist-i686-pc-linux-gnu/gdb/tes
tsuite/gdb.threads/staticthreads
Reading symbols from /home/cagney/PENDING/rh-th-static/N-tourist-i686-pc-linux-gnu/gdb/testsuite/gdb.threads/staticthreads...done.
(gdb) set print sevenbit-strings
(gdb) PASS: gdb.threads/staticthreads.exp: set print sevenbit-strings
delete breakpoints
(gdb) info breakpoints
No breakpoints or watchpoints.
(gdb) break main
Breakpoint 1 at 0x8048254: file /home/cygnus/cagney/PENDING/rh-th-static/src/gdb/testsuite/gdb.threads/staticthreads.c, line 53.
(gdb) run
Starting program: /home/cagney/PENDING/rh-th-static/N-tourist-i686-pc-linux-gnu/gdb/testsuite/gdb.threads/staticthreads
Breakpoint 1, main (argc=1, argv=0xfef0e694) at /home/cygnus/cagney/PENDING/rh-th-static/src/gdb/testsuite/gdb.threads/staticthreads.c:53
53 pthread_attr_init (&attr);
(gdb) break sem_post
Breakpoint 2 at 0x804bf8d
(gdb) PASS: gdb.threads/staticthreads.exp: break sem_post
continue
Continuing.
Thread executing
Program received signal SIG32, Real-time event 32.
0x0804b367 in __pthread_sigsuspend ()
(gdb) KFAIL: gdb.threads/staticthreads.exp: Continue to main's call of sem_post (PRMS: gdb/1328)
run
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/cagney/PENDING/rh-th-static/N-tourist-i686-pc-linux-gnu/gdb/testsuite/gdb.threads/staticthreads
Breakpoint 1, main (argc=1, argv=0xfee72504) at /home/cygnus/cagney/PENDING/rh-th-static/src/gdb/testsuite/gdb.threads/staticthreads.c:53
53 pthread_attr_init (&attr);
(gdb) PASS: gdb.threads/staticthreads.exp: rerun to main
handle SIG32 nostop noprint pass
Signal Stop Print Pass to program Description
SIG32 No No Yes Real-time event 32
(gdb) PASS: gdb.threads/staticthreads.exp: handle SIG32 nostop noprint pass
continue
Continuing.
Thread executing
Breakpoint 2, 0x0804bf8d in sem_post ()
(gdb) PASS: gdb.threads/staticthreads.exp: handle SIG32 helps
info threads
(gdb) KFAIL: gdb.threads/staticthreads.exp: info threads (PRMS: gdb/1328)
quit
The program is running. Exit anyway? (y or n) y
PASS: gdb.threads/staticthreads.exp: GDB exits with static thread program
testcase /home/cygnus/cagney/PENDING/rh-th-static/src/gdb/testsuite/gdb.threads/staticthreads.exp completed in 6 seconds
=== gdb Summary ===
# of expected passes 7
# of known failures 2
Executing on host: /home/cagney/PENDING/rh-th-static/N-tourist-i686-pc-linux-gnu/gdb/testsuite/../../gdb/gdb -nw --command gdb_cmd (timeout = 300)
GNU gdb 2004-08-12-cvs
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu".
/home/cagney/PENDING/rh-th-static/N-tourist-i686-pc-linux-gnu/gdb/testsuite/../../gdb/gdb version 2004-08-12-cvs -nx
runtest completed at Fri Aug 27 10:34:46 2004
next prev parent reply other threads:[~2004-08-27 14:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-10 14:19 Andrew Cagney
2004-08-10 14:32 ` Michael Chastain
2004-08-12 0:33 ` Michael Snyder
2004-08-12 1:21 ` Andrew Cagney
2004-08-27 2:57 ` Michael Snyder
2004-08-27 14:49 ` Andrew Cagney [this message]
2004-09-01 2:27 ` Michael Snyder
2004-09-01 19:28 ` Andrew Cagney
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=412F49A7.3080302@gnu.org \
--to=cagney@gnu.org \
--cc=ac131313@redhat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=msnyder@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