From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6772 invoked by alias); 2 Sep 2013 10:24:33 -0000 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 Received: (qmail 6763 invoked by uid 89); 2 Sep 2013 10:24:33 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 02 Sep 2013 10:24:33 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.8 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r82AOSqw022962 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 2 Sep 2013 06:24:29 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r82AOQjd009742; Mon, 2 Sep 2013 06:24:27 -0400 Message-ID: <5224675A.20104@redhat.com> Date: Mon, 02 Sep 2013 10:24:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Muhammad Waqas CC: gdb-patches@sourceware.org Subject: Re: [PATCH with testcase] Bug 11568 - delete thread-specific breakpoint on the thread exit References: <521CF7D0.5040801@redhat.com> <1377692710-2885-1-git-send-email-mwaqas@codesourcery.com> <5220C80D.5030502@redhat.com> <52240E9A.4030708@codesourcery.com> <52244EBE.1080107@redhat.com> <52245E5D.2030806@codesourcery.com> In-Reply-To: <52245E5D.2030806@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-09/txt/msg00008.txt.bz2 On 09/02/2013 10:46 AM, Muhammad Waqas wrote: > 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. Alright, thanks. That's indeed the difference: Yours: > (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 Mine: > (gdb) PASS: gdb.threads/thread-specific-bp.exp: All stop: continue to breakpoint: start > info threads > Id Target Id Frame > * 2 Thread 0x7ffff7fca700 (LWP 16383) "thread-specific" start (arg=0x0) at ../../../src/gdb/testsuite/gdb.threads/thread-specific-bp.c:23 > 1 Thread 0x7ffff7fcb740 (LWP 16379) "thread-specific" 0x000000323dc08e60 in pthread_join (threadid=140737353918208, thread_return=0x0) at pthread_join.c:93 > (gdb) PASS: gdb.threads/thread-specific-bp.exp: All stop: thread created I can tell because yours doesn't show the arguments to pthread_join. So in your case the bug doesn't trigger because set_current_sal_from_frame, called from print_stack_frame, does nothing if the frame (in this case pthread_join's) doesn't have a symtab: void set_current_sal_from_frame (struct frame_info *frame, int center) { struct symtab_and_line sal; find_frame_sal (frame, &sal); if (sal.symtab) { if (center) sal.line = max (sal.line - get_lines_to_list () / 2, 1); set_current_source_symtab_and_line (&sal); } } -- Pedro Alves