From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18072 invoked by alias); 28 Jun 2008 18:20:39 -0000 Received: (qmail 18018 invoked by uid 22791); 28 Jun 2008 18:20:37 -0000 X-Spam-Check-By: sourceware.org Received: from mtaout2.012.net.il (HELO mtaout2.012.net.il) (84.95.2.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 28 Jun 2008 18:19:57 +0000 Received: from HOME-C4E4A596F7 ([80.230.31.196]) by i_mtaout2.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K360038WRMNL510@i_mtaout2.012.net.il> for gdb-patches@sources.redhat.com; Sat, 28 Jun 2008 21:35:11 +0300 (IDT) Date: Sat, 28 Jun 2008 18:26:00 -0000 From: Eli Zaretskii Subject: Re: [MI non-stop 04/11] Implement --thread and --frame. In-reply-to: <6D19CA8D71C89C43A057926FE0D4ADAA04E1BD85@ecamlmw720.eamcs.ericsson.se> X-012-Sender: halo1@inter.net.il To: Marc Khouzam Cc: vladimir@codesourcery.com, gdb-patches@sources.redhat.com Reply-to: Eli Zaretskii Message-id: References: <200806282044.14246.vladimir@codesourcery.com> <6D19CA8D71C89C43A057926FE0D4ADAA04E1BD85@ecamlmw720.eamcs.ericsson.se> 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: 2008-06/txt/msg00561.txt.bz2 > Date: Sat, 28 Jun 2008 13:56:21 -0400 > From: "Marc Khouzam" > > I'm not sure what the coding style is for GDB in this case, but I have > found that it is more maintainable not to hard-code the lengths, but to use > something like > char* threadStr = "--thread "; > int len = strlen(threadStr); I'd prefer char threadStr[] = "--thread "; size_t len = sizeof(threadStr) - 1; which will avoid any runtime penalties.