From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13941 invoked by alias); 4 Sep 2013 12:24:47 -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 13928 invoked by uid 89); 4 Sep 2013 12:24:46 -0000 Received: from mga02.intel.com (HELO mga02.intel.com) (134.134.136.20) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 04 Sep 2013 12:24:46 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_20,KHOP_THREADED,RDNS_NONE,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: mga02.intel.com Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 04 Sep 2013 05:24:43 -0700 X-ExtLoop1: 1 Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by orsmga001.jf.intel.com with ESMTP; 04 Sep 2013 05:24:42 -0700 Received: from irsmsx152.ger.corp.intel.com (163.33.192.66) by IRSMSX104.ger.corp.intel.com (163.33.3.159) with Microsoft SMTP Server (TLS) id 14.3.123.3; Wed, 4 Sep 2013 13:24:36 +0100 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.64]) by IRSMSX152.ger.corp.intel.com ([169.254.6.33]) with mapi id 14.03.0123.003; Wed, 4 Sep 2013 13:24:36 +0100 From: "Agovic, Sanimir" To: 'Mohsan Saleem' CC: "gdb-patches@sourceware.org" Subject: RE: [PATCH] fix PR-12417 Date: Wed, 04 Sep 2013 12:24:00 -0000 Message-ID: <0377C58828D86C4588AEEC42FC3B85A71766C3B0@IRSMSX105.ger.corp.intel.com> References: <521E2414.40602@codesourcery.com> <52254BC6.1050105@codesourcery.com> <1378282781.96893.YahooMailNeo@web142604.mail.bf1.yahoo.com> <0377C58828D86C4588AEEC42FC3B85A71766C229@IRSMSX105.ger.corp.intel.com> <1378293943.43616.YahooMailNeo@web142603.mail.bf1.yahoo.com> In-Reply-To: <1378293943.43616.YahooMailNeo@web142603.mail.bf1.yahoo.com> Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2013-09/txt/msg00128.txt.bz2 Thanks for taking care of my comments. +const char * +thread_name (struct thread_info *ti) +{ + const char *name; + + name =3D ti->name !=3D NULL ? ti->name : target_thread_name (ti); + return name !=3D NULL ? name : ""; +} Imho, we must always call target_thread_name to get the latest thread name. =20 > -----Original Message----- > From: Mohsan Saleem [mailto:mohsansaleem_ms@yahoo.com] > Sent: Wednesday, September 04, 2013 01:26 PM > To: Agovic, Sanimir > Cc: gdb-patches@sourceware.org > Subject: Re: [PATCH] fix PR-12417 >=20 > >> =A0 =A0=A0if=A0(print_thread_events) > >> -=A0 =A0 printf_unfiltered (_("[New %s]\n"), target_pid_to_str (ptid)); > >> +=A0 =A0 printf_unfiltered (_("[New %s \"%s\"]\n"), target_pid_to_str = (ptid), thread_name > >> >=20 > >This will print [New 1234 ""] in case a=A0thread=A0name is not available= , not sure if we > >should=A0omit=A0thread name=A0instead. >=20 > As when a new thread is created then by default program name is assigned = to it. So it will > print [New 1234 "a.out"], if program is named as "a.out" >=20 I see, just was curious if one might see an empty quoted string. -Sanimir Intel GmbH Dornacher Strasse 1 85622 Feldkirchen/Muenchen, Deutschland Sitz der Gesellschaft: Feldkirchen bei Muenchen Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk Registergericht: Muenchen HRB 47456 Ust.-IdNr./VAT Registration No.: DE129385895 Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052