From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20621 invoked by alias); 28 Jun 2008 18:23:13 -0000 Received: (qmail 20613 invoked by uid 22791); 28 Jun 2008 18:23:12 -0000 X-Spam-Check-By: sourceware.org Received: from imr2.ericy.com (HELO imr2.ericy.com) (198.24.6.3) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 28 Jun 2008 18:22:21 +0000 Received: from eusrcmw751.eamcs.ericsson.se (eusrcmw751.exu.ericsson.se [138.85.77.51]) by imr2.ericy.com (8.13.1/8.13.1) with ESMTP id m5SIMA1S019102; Sat, 28 Jun 2008 13:22:10 -0500 Received: from ecamlmw720.eamcs.ericsson.se ([142.133.1.72]) by eusrcmw751.eamcs.ericsson.se with Microsoft SMTPSVC(6.0.3790.1830); Sat, 28 Jun 2008 13:22:42 -0500 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: [MI non-stop 04/11] Implement --thread and --frame. Date: Sat, 28 Jun 2008 18:26:00 -0000 Message-ID: <6D19CA8D71C89C43A057926FE0D4ADAA04E1BD87@ecamlmw720.eamcs.ericsson.se> References: <200806282044.14246.vladimir@codesourcery.com> From: "Marc Khouzam" To: "Eli Zaretskii" , "Vladimir Prus" Cc: 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/msg00562.txt.bz2 > >=20 > > sizeof? For all I know, sizeof("--thread") will be wrong here. >=20 > Why would it be wrong? sizeof("--thread") seems to count the \0, so you need to do subtract 1. Another danger is that if someone decides to convert from sizeof("--thread") to something like: char* str=3D"--thread"; int len=3Dsizeof(str);=20 you are going to the size of a char* (4) inste of the string. I think strlen() is better. Marc