From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28977 invoked by alias); 2 May 2013 15:22:30 -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 28962 invoked by uid 89); 2 May 2013 15:22:29 -0000 X-Spam-SWARE-Status: No, score=-6.1 required=5.0 tests=AWL,BAYES_00,KAM_STOCKGEN,KHOP_THREADED,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 02 May 2013 15:22:28 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r42FMPRl025051 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 2 May 2013 11:22:26 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r42FMNZY021823; Thu, 2 May 2013 11:22:25 -0400 Message-ID: <518284AF.5090802@redhat.com> Date: Thu, 02 May 2013 15:22:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 MIME-Version: 1.0 To: Joel Brobecker CC: gdb-patches@sourceware.org Subject: Re: FYI: copy/paste error in sol-thread.c ? References: <20130430110928.GF3525@adacore.com> In-Reply-To: <20130430110928.GF3525@adacore.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-05/txt/msg00029.txt.bz2 On 04/30/2013 12:09 PM, Joel Brobecker wrote: > ... while working on fixing the few compilation errors in that file, > I noticed: > > /* If thread is asleep, print function that went to sleep. */ > if (ti.ti_state == TD_THR_SLEEP) > { > const struct bound_minimal_symbol msym > = lookup_minimal_symbol_by_pc (ti.ti_pc); > > if (msym.minsym) > printf_filtered (" - Sleep func: %s\n", > SYMBOL_PRINT_NAME (msym.minsym)); > else > printf_filtered (" - Sleep func: %s\n", > paddress (target_gdbarch (), ti.ti_startfunc)); > ^^^^^^^^^^^^^^^ > ||||||||||||||| > } > > I find the use of ti.ti_startfunc looks suspiciously like a copy/paste > of the code right above: I agree it looks like a copy/paste. Very very very minor, but the prints look a little odd to me: > printf_filtered (" startfunc: %s\n", > printf_filtered (" - Sleep func: %s\n" The first is lowercase, and doesn't start with '-', while the other line is uppercase, and has a '-'... Looks odd. It reads to me as if the original intention was to put this all in the same line, but then the startfunc print includes \n, breaking it... -- Pedro Alves