Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Muhammad Waqas <mwaqas@codesourcery.com>
To: Pedro Alves <palves@redhat.com>
Cc: <gdb-patches@sourceware.org>
Subject: Re: [PATCH with testcase] Bug 11568 - delete thread-specific breakpoint on the thread exit
Date: Mon, 02 Sep 2013 09:46:00 -0000	[thread overview]
Message-ID: <52245E5D.2030806@codesourcery.com> (raw)
In-Reply-To: <52244EBE.1080107@redhat.com>

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

On 09/02/2013 01:39 PM, Pedro Alves wrote:
> Hmm.  I'm guessing the difference will be you don't have debug
> info for you glibc.  Could you do
> 
>  do make check RUNTESTFLAGS="thread-specific-bp.exp"
> 
> and send the resulting gdb.log?

find gdb.log in attachment.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: gdb.log --]
[-- Type: text/x-log; name="gdb.log", Size: 14052 bytes --]

Test Run By waqas on Mon Sep  2 14:42:25 2013
Native configuration is x86_64-unknown-linux-gnu

		=== gdb tests ===

Schedule of variations:
    unix

Running target unix
Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target.
Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
Using ../.././../gdb/gdb/testsuite/config/unix.exp as tool-and-target-specific interface file.
Running ../.././../gdb/gdb/testsuite/gdb.threads/thread-specific-bp.exp ...
Executing on host: gcc ../.././../gdb/gdb/testsuite/gdb.threads/thread-specific-bp.c  -g  -lpthreads -lm   -o /home/waqas/28-gdb/hd/obj/gdb/testsuite/gdb.threads/thread-specific-bp    (timeout = 300)
spawn gcc ../.././../gdb/gdb/testsuite/gdb.threads/thread-specific-bp.c -g -lpthreads -lm -o /home/waqas/28-gdb/hd/obj/gdb/testsuite/gdb.threads/thread-specific-bp
/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 ../.././../gdb/gdb/testsuite/gdb.threads/thread-specific-bp.c  -g  -lpthread -lm   -o /home/waqas/28-gdb/hd/obj/gdb/testsuite/gdb.threads/thread-specific-bp    (timeout = 300)
spawn gcc ../.././../gdb/gdb/testsuite/gdb.threads/thread-specific-bp.c -g -lpthread -lm -o /home/waqas/28-gdb/hd/obj/gdb/testsuite/gdb.threads/thread-specific-bp
PASS: gdb.threads/thread-specific-bp.exp: successfully compiled posix threads test case
spawn /home/waqas/28-gdb/hd/obj/gdb/testsuite/../../gdb/gdb -nw -nx -data-directory /home/waqas/28-gdb/hd/obj/gdb/testsuite/../data-directory
GNU gdb (GDB) 7.6.50.20130828-cvs
Copyright (C) 2013 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".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".

(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 ../.././../gdb/gdb/testsuite/gdb.threads
Source directories searched: /home/waqas/28-gdb/hd/obj/gdb/testsuite/../.././../gdb/gdb/testsuite/gdb.threads:$cdir:$cwd
(gdb) kill
The program is not being run.
(gdb) file /home/waqas/28-gdb/hd/obj/gdb/testsuite/gdb.threads/thread-specific-bp
Reading symbols from /home/waqas/28-gdb/hd/obj/gdb/testsuite/gdb.threads/thread-specific-bp...done.
(gdb) delete breakpoints
(gdb) info breakpoints
No breakpoints or watchpoints.
(gdb) break main
Breakpoint 1 at 0x4005cb: file ../.././../gdb/gdb/testsuite/gdb.threads/thread-specific-bp.c, line 30.
(gdb) run 
Starting program: /home/waqas/28-gdb/hd/obj/gdb/testsuite/gdb.threads/thread-specific-bp 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Breakpoint 1, main () at ../.././../gdb/gdb/testsuite/gdb.threads/thread-specific-bp.c:30
30	  pthread_create (&thread, NULL, start, NULL);
(gdb) break start
Breakpoint 2 at 0x4005bc: file ../.././../gdb/gdb/testsuite/gdb.threads/thread-specific-bp.c, line 23.
(gdb) continue
Continuing.
[New Thread 0x2aaaab4af700 (LWP 5815)]
[Switching to Thread 0x2aaaab4af700 (LWP 5815)]

Breakpoint 2, start (arg=0x0) at ../.././../gdb/gdb/testsuite/gdb.threads/thread-specific-bp.c:23
23	  return NULL;
(gdb) PASS: gdb.threads/thread-specific-bp.exp: All stop: continue to breakpoint: start
info threads
  Id   Target Id         Frame 
* 2    Thread 0x2aaaab4af700 (LWP 5815) "thread-specific" start (arg=0x0) at ../.././../gdb/gdb/testsuite/gdb.threads/thread-specific-bp.c:23
  1    Thread 0x2aaaab2ad700 (LWP 5811) "thread-specific" 0x00002aaaaacd9148 in pthread_join () from /lib/x86_64-linux-gnu/libpthread.so.0
(gdb) PASS: gdb.threads/thread-specific-bp.exp: All stop: thread created
break main thread 2
Note: breakpoint 1 (all threads) also set at pc 0x4005cb.
Breakpoint 3 at 0x4005cb: file ../.././../gdb/gdb/testsuite/gdb.threads/thread-specific-bp.c, line 30.
(gdb) info break
Num     Type           Disp Enb Address            What
1       breakpoint     keep y   0x00000000004005cb in main at ../.././../gdb/gdb/testsuite/gdb.threads/thread-specific-bp.c:30
	breakpoint already hit 1 time
2       breakpoint     keep y   0x00000000004005bc in start at ../.././../gdb/gdb/testsuite/gdb.threads/thread-specific-bp.c:23
	breakpoint already hit 1 time
3       breakpoint     keep y   0x00000000004005cb in main at ../.././../gdb/gdb/testsuite/gdb.threads/thread-specific-bp.c:30 thread 2
	stop only in thread 2
(gdb) PASS: gdb.threads/thread-specific-bp.exp: All stop: Breakpoint set
break 32
Breakpoint 4 at 0x4005f7: file ../.././../gdb/gdb/testsuite/gdb.threads/thread-specific-bp.c, line 32.
(gdb) commands
Type commands for breakpoint(s) 4, one per line.
End with a line saying just "end".
>info threads
>end
(gdb) PASS: gdb.threads/thread-specific-bp.exp: All stop: add breakpoint commands
thread 2
[Switching to thread 2 (Thread 0x2aaaab4af700 (LWP 5815))]
#0  start (arg=0x0) at ../.././../gdb/gdb/testsuite/gdb.threads/thread-specific-bp.c:23
23	  return NULL;
(gdb) PASS: gdb.threads/thread-specific-bp.exp: All stop: Thread 2 selected
continue
Continuing.
[Thread 0x2aaaab4af700 (LWP 5815) exited]
Breakpoint 3 deletedbecause thread 2 has been exited
on which this  breakpoint is valid.
[Switching to Thread 0x2aaaab2ad700 (LWP 5811)]

Breakpoint 4, main () at ../.././../gdb/gdb/testsuite/gdb.threads/thread-specific-bp.c:32
32	  return 0; /*set break here*/
  Id   Target Id         Frame 
* 1    Thread 0x2aaaab2ad700 (LWP 5811) "thread-specific" main () at ../.././../gdb/gdb/testsuite/gdb.threads/thread-specific-bp.c:32
(gdb) PASS: gdb.threads/thread-specific-bp.exp: All stop: continue to breakpoint: set break here
info breakpoint
Num     Type           Disp Enb Address            What
1       breakpoint     keep y   0x00000000004005cb in main at ../.././../gdb/gdb/testsuite/gdb.threads/thread-specific-bp.c:30
	breakpoint already hit 1 time
2       breakpoint     keep y   0x00000000004005bc in start at ../.././../gdb/gdb/testsuite/gdb.threads/thread-specific-bp.c:23
	breakpoint already hit 1 time
4       breakpoint     keep y   0x00000000004005f7 in main at ../.././../gdb/gdb/testsuite/gdb.threads/thread-specific-bp.c:32
	breakpoint already hit 1 time
        info threads
(gdb) PASS: gdb.threads/thread-specific-bp.exp: All stop: thread-specific breakpoint is deleted
spawn /home/waqas/28-gdb/hd/obj/gdb/testsuite/../../gdb/gdb -nw -nx -data-directory /home/waqas/28-gdb/hd/obj/gdb/testsuite/../data-directory
GNU gdb (GDB) 7.6.50.20130828-cvs
Copyright (C) 2013 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".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".

(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 ../.././../gdb/gdb/testsuite/gdb.threads
Source directories searched: /home/waqas/28-gdb/hd/obj/gdb/testsuite/../.././../gdb/gdb/testsuite/gdb.threads:$cdir:$cwd
(gdb) kill
The program is not being run.
(gdb) file /home/waqas/28-gdb/hd/obj/gdb/testsuite/gdb.threads/thread-specific-bp
Reading symbols from /home/waqas/28-gdb/hd/obj/gdb/testsuite/gdb.threads/thread-specific-bp...done.
(gdb) set target-async on
(gdb) PASS: gdb.threads/thread-specific-bp.exp: Set async mode
set non-stop on
(gdb) PASS: gdb.threads/thread-specific-bp.exp: Set non stop mode
delete breakpoints
(gdb) info breakpoints
No breakpoints or watchpoints.
(gdb) break main
Breakpoint 1 at 0x4005cb: file ../.././../gdb/gdb/testsuite/gdb.threads/thread-specific-bp.c, line 30.
(gdb) run 
Starting program: /home/waqas/28-gdb/hd/obj/gdb/testsuite/gdb.threads/thread-specific-bp 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Breakpoint 1, main () at ../.././../gdb/gdb/testsuite/gdb.threads/thread-specific-bp.c:30
30	  pthread_create (&thread, NULL, start, NULL);
(gdb) break start
Breakpoint 2 at 0x4005bc: file ../.././../gdb/gdb/testsuite/gdb.threads/thread-specific-bp.c, line 23.
(gdb) continue
Continuing.
[New Thread 0x2aaaab4af700 (LWP 5828)]

Breakpoint 2, start (arg=0x0) at ../.././../gdb/gdb/testsuite/gdb.threads/thread-specific-bp.c:23
23	  return NULL;
(gdb) PASS: gdb.threads/thread-specific-bp.exp: non-stop with async: continue to breakpoint: start
info threads
  Id   Target Id         Frame 
  2    Thread 0x2aaaab4af700 (LWP 5828) "thread-specific" start (arg=0x0) at ../.././../gdb/gdb/testsuite/gdb.threads/thread-specific-bp.c:23
* 1    Thread 0x2aaaab2ad700 (LWP 5824) "thread-specific" (running)
(gdb) PASS: gdb.threads/thread-specific-bp.exp: non-stop with async: thread created
break main thread 2
Note: breakpoint 1 (all threads) also set at pc 0x4005cb.
Breakpoint 3 at 0x4005cb: file ../.././../gdb/gdb/testsuite/gdb.threads/thread-specific-bp.c, line 30.
(gdb) info break
Num     Type           Disp Enb Address            What
1       breakpoint     keep y   0x00000000004005cb in main at ../.././../gdb/gdb/testsuite/gdb.threads/thread-specific-bp.c:30
	breakpoint already hit 1 time
2       breakpoint     keep y   0x00000000004005bc in start at ../.././../gdb/gdb/testsuite/gdb.threads/thread-specific-bp.c:23
	breakpoint already hit 1 time
3       breakpoint     keep y   0x00000000004005cb in main at ../.././../gdb/gdb/testsuite/gdb.threads/thread-specific-bp.c:30 thread 2
	stop only in thread 2
(gdb) PASS: gdb.threads/thread-specific-bp.exp: non-stop with async: Breakpoint set
break 32
Breakpoint 4 at 0x4005f7: file ../.././../gdb/gdb/testsuite/gdb.threads/thread-specific-bp.c, line 32.
(gdb) commands
Type commands for breakpoint(s) 4, one per line.
End with a line saying just "end".
>info threads
>end
(gdb) PASS: gdb.threads/thread-specific-bp.exp: non-stop with async: add breakpoint commands
thread 2
[Switching to thread 2 (Thread 0x2aaaab4af700 (LWP 5828))]
#0  start (arg=0x0) at ../.././../gdb/gdb/testsuite/gdb.threads/thread-specific-bp.c:23
23	  return NULL;
(gdb) PASS: gdb.threads/thread-specific-bp.exp: non-stop with async: Thread 2 selected
continue
Continuing.
[Thread 0x2aaaab4af700 (LWP 5828) exited]
Breakpoint 3 deletedbecause thread 2 has been exited
on which this  breakpoint is valid.

Breakpoint 4, main () at ../.././../gdb/gdb/testsuite/gdb.threads/thread-specific-bp.c:32
32	  return 0; /*set break here*/
  Id   Target Id         Frame 
* 1    Thread 0x2aaaab2ad700 (LWP 5824) "thread-specific" main () at ../.././../gdb/gdb/testsuite/gdb.threads/thread-specific-bp.c:32
(gdb) PASS: gdb.threads/thread-specific-bp.exp: non-stop with async: continue to breakpoint: set break here
info breakpoint
Num     Type           Disp Enb Address            What
1       breakpoint     keep y   0x00000000004005cb in main at ../.././../gdb/gdb/testsuite/gdb.threads/thread-specific-bp.c:30
	breakpoint already hit 1 time
2       breakpoint     keep y   0x00000000004005bc in start at ../.././../gdb/gdb/testsuite/gdb.threads/thread-specific-bp.c:23
	breakpoint already hit 1 time
4       breakpoint     keep y   0x00000000004005f7 in main at ../.././../gdb/gdb/testsuite/gdb.threads/thread-specific-bp.c:32
	breakpoint already hit 1 time
        info threads
(gdb) PASS: gdb.threads/thread-specific-bp.exp: non-stop with async: thread-specific breakpoint is deleted
testcase ../.././../gdb/gdb/testsuite/gdb.threads/thread-specific-bp.exp completed in 0 seconds

		=== gdb Summary ===

# of expected passes		17
Executing on host: /home/waqas/28-gdb/hd/obj/gdb/testsuite/../../gdb/gdb -nw -nx -data-directory /home/waqas/28-gdb/hd/obj/gdb/testsuite/../data-directory --version    (timeout = 300)
spawn /home/waqas/28-gdb/hd/obj/gdb/testsuite/../../gdb/gdb -nw -nx -data-directory /home/waqas/28-gdb/hd/obj/gdb/testsuite/../data-directory --version
GNU gdb (GDB) 7.6.50.20130828-cvs
Copyright (C) 2013 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".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".

/home/waqas/28-gdb/hd/obj/gdb/testsuite/../../gdb/gdb version  7.6.50.20130828-cvs -nw -nx -data-directory /home/waqas/28-gdb/hd/obj/gdb/testsuite/../data-directory 

runtest completed at Mon Sep  2 14:42:25 2013

  reply	other threads:[~2013-09-02  9:46 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-29  7:29 Muhammad Waqas
2013-07-29  9:21 ` Yao Qi
2013-07-29 11:42   ` Muhammad Waqas
2013-07-29 14:18     ` Yao Qi
2013-07-30 10:34       ` Muhammad Waqas
2013-07-31  2:41         ` Yao Qi
2013-08-01 10:51           ` Pedro Alves
2013-08-01 10:59             ` Yao Qi
2013-08-01 11:27               ` Pedro Alves
2013-08-01 12:10                 ` Yao Qi
2013-08-01 11:57         ` Pedro Alves
2013-08-01 12:44           ` Muhammad Waqas
2013-08-02  9:45             ` Pedro Alves
2013-08-05 12:01               ` Muhammad Waqas
2013-08-05 13:57                 ` Tom Tromey
2013-08-06  6:12                   ` Muhammad Waqas
2013-08-22  9:42                     ` Muhammad Waqas
2013-08-22 17:14                       ` Pedro Alves
2013-08-23  5:31                         ` Muhammad Waqas
2013-08-27 11:31                         ` Muhammad Waqas
2013-08-27 19:02                           ` Pedro Alves
2013-08-27 19:06                             ` Pedro Alves
2013-08-28 12:26                             ` Muhammad Waqas
2013-08-28 12:26                             ` Muhammad Waqas
2013-08-30 16:28                               ` Pedro Alves
2013-09-02  4:06                                 ` Muhammad Waqas
2013-09-02  8:39                                   ` Pedro Alves
2013-09-02  9:46                                     ` Muhammad Waqas [this message]
2013-09-02 10:24                                       ` Pedro Alves
2013-09-02 10:32                                         ` Muhammad Waqas
2013-09-02 10:48                                           ` Pedro Alves
2013-09-02 16:46                               ` Pedro Alves
2013-09-02 16:52                                 ` [PATCH] PR gdb/11568 - delete thread-specific breakpoints on " Pedro Alves
2013-09-09 16:07                                   ` Tom Tromey
2013-09-17 19:36                                     ` Pedro Alves
2013-09-19 14:48                                       ` [COMMIT PATCH] Fix regressions caused by thread-specific breakpoint deletion. (was: Re: [PATCH] PR gdb/11568 - delete thread-specific breakpoints on thread exit) Pedro Alves

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=52245E5D.2030806@codesourcery.com \
    --to=mwaqas@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@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