From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13682 invoked by alias); 8 Sep 2007 12:28:24 -0000 Received: (qmail 13672 invoked by uid 22791); 8 Sep 2007 12:28:23 -0000 X-Spam-Check-By: sourceware.org Received: from romy.inter.net.il (HELO romy.inter.net.il) (213.8.233.24) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 08 Sep 2007 12:28:18 +0000 Received: from HOME-C4E4A596F7 (IGLD-80-230-141-251.inter.net.il [80.230.141.251]) by romy.inter.net.il (MOS 3.7.3-GA) with ESMTP id IVN58948 (AUTH halo1); Sat, 8 Sep 2007 15:28:07 +0300 (IDT) Date: Sat, 08 Sep 2007 12:28:00 -0000 Message-Id: From: Eli Zaretskii To: Vladimir Prus CC: gdb-patches@sources.redhat.com In-reply-to: <200709081555.00821.vladimir@codesourcery.com> (message from Vladimir Prus on Sat, 8 Sep 2007 15:55:00 +0400) Subject: Re: [8/9] multiple locations Reply-to: Eli Zaretskii References: <200709080248.52539.vladimir@codesourcery.com> <200709081555.00821.vladimir@codesourcery.com> 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-09/txt/msg00118.txt.bz2 > From: Vladimir Prus > Date: Sat, 8 Sep 2007 15:55:00 +0400 > Cc: gdb-patches@sources.redhat.com > > > > + if (part_of_multiple) > > > + { > > > + char buf[30]; > > > > Why 30? GNU coding standards frown on arbitrary constant sizes. > > > > > + sprintf (buf, "%d.%d", b->number, loc_number); > > Clearly, '30' is sufficient for 2^32 breakpoints, each having 2^32 locations. Are we talking only about 32-bit machines? > I don't think using variable-size buffer is going to have any difference. I thought more about the lines of xsnprintf or some similar function, which removes the need to worry about these issues.