From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15000 invoked by alias); 2 Feb 2007 15:18:52 -0000 Received: (qmail 14987 invoked by uid 22791); 2 Feb 2007 15:18:52 -0000 X-Spam-Check-By: sourceware.org Received: from lon-del-01.spheriq.net (HELO lon-del-01.spheriq.net) (195.46.50.97) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 02 Feb 2007 15:18:41 +0000 Received: from lon-out-01.spheriq.net ([195.46.50.129]) by lon-del-01.spheriq.net with ESMTP id l12FIccO027191 for ; Fri, 2 Feb 2007 15:18:38 GMT Received: from lon-cus-02.spheriq.net (lon-cus-02.spheriq.net [195.46.50.38]) by lon-out-01.spheriq.net with ESMTP id l12FIciS017498 for ; Fri, 2 Feb 2007 15:18:38 GMT Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by lon-cus-02.spheriq.net with ESMTP id l12FIaAb030122 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK) for ; Fri, 2 Feb 2007 15:18:37 GMT Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id AE6FCDB45 for ; Fri, 2 Feb 2007 15:10:20 +0000 (GMT) Received: from mail1.cro.st.com (mail1.cro.st.com [164.129.40.131]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 853A5474D4 for ; Fri, 2 Feb 2007 15:10:20 +0000 (GMT) Received: from [164.129.44.95] (crx595.cro.st.com [164.129.44.95]) by mail1.cro.st.com (MOS 3.7.5a-GA) with ESMTP id CJQ23166 (AUTH "denis pilat"); Fri, 2 Feb 2007 16:10:19 +0100 (CET) Message-ID: <45C3545A.6020902@st.com> Date: Fri, 02 Feb 2007 15:18:00 -0000 From: Denis PILAT User-Agent: Thunderbird 1.5.0.9 (X11/20061206) MIME-Version: 1.0 To: gdb-patches Subject: Re: [RFA] [gdb.threads/testsuite] failure while checking backtrace into main References: <45C0C028.1050401@st.com> <45C34A05.1060901@st.com> <20070202143631.GA24397@nevyn.them.org> In-Reply-To: <20070202143631.GA24397@nevyn.them.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: 2007-02/txt/msg00020.txt.bz2 Daniel Jacobowitz wrote: > On Fri, Feb 02, 2007 at 03:26:13PM +0100, Denis PILAT wrote: >> We can also just remove the testing of argc and argv from the >> pthreads.exp file, that would be better I think. > > I like this better. But, before I approve it, could you show me what > the output looks like from your compiler - both the backtrace and the > output of "readelf -wi" for main, argc, and argv? I bet it's a bug > that we don't show argc and argv at least as argc=. > >> 2007-02-02 Denis Pilat >> >> * gdb.threads/pthreads.exp: remove checking of unused argc and argv >> since they can be removed by a compiler optiisation. > > This would be: > > * gdb.threads/pthreads.exp (check_backtraces): Remove checking > of unused argc and argv. > The backtrace is: thread apply 1 backtrace Thread 1 (Thread -1218551680 (LWP 2236)): #0 0x00560aec in nanosleep () from /lib/tls/libc.so.6 #1 0x0056090f in sleep () from /lib/tls/libc.so.6 #2 0x0804891f in main () at /project/flexdbug/user/pd10/gdb/sts-gdb-repository/vendor/gdb/gdb/testsuite/gdb.threads/pthreads.c:166 53 if (verbose) printf("common_routine (%d)\n", arg); (gdb) FAIL: gdb.threads/pthreads.exp: check backtrace from main thread The readelf for a gcc4.1.1 is: <1><423>: Abbrev Number: 14 (DW_TAG_subprogram) DW_AT_sibling : <4ad> DW_AT_external : 1 DW_AT_name : main DW_AT_decl_file : 1 DW_AT_decl_line : 118 DW_AT_type : DW_AT_low_pc : 0x804876b DW_AT_high_pc : 0x804893d DW_AT_frame_base : 0xb0 (location list) <2><440>: Abbrev Number: 15 (DW_TAG_formal_parameter) DW_AT_name : argc DW_AT_decl_file : 1 DW_AT_decl_line : 116 DW_AT_type : <2><44c>: Abbrev Number: 15 (DW_TAG_formal_parameter) DW_AT_name : argv DW_AT_decl_file : 1 DW_AT_decl_line : 117 DW_AT_type : <4ad> There is no location for argc and argv. It might be a gcc4.1.1 bug, I don't know how much it can optimize the code, argc and argv are not used. For gcc3.3 there are DW_AT_location for both argc and argv. -- Denis