From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24134 invoked by alias); 19 Dec 2007 15:27:41 -0000 Received: (qmail 24120 invoked by uid 22791); 19 Dec 2007 15:27:39 -0000 X-Spam-Check-By: sourceware.org Received: from s200aog11.obsmtp.com (HELO psmtp.com) (207.126.144.125) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 19 Dec 2007 15:27:31 +0000 Received: from source ([164.129.1.35]) (using TLSv1) by eu1sys200aob011.postini.com ([207.126.147.11]) with SMTP; Wed, 19 Dec 2007 15:27:27 UTC Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 7FB94DA75; Wed, 19 Dec 2007 15:27:22 +0000 (GMT) Received: from mail2.cro.st.com (mail2.cro.st.com [164.129.40.132]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 455E54C0BD; Wed, 19 Dec 2007 15:27:22 +0000 (GMT) Received: from crx595.cro.st.com (crx595.cro.st.com [164.129.44.95]) by mail2.cro.st.com (MOS 3.7.5a-GA) with ESMTP id CKB89396 (AUTH "denis pilat"); Wed, 19 Dec 2007 16:27:21 +0100 (CET) Message-ID: <47693859.6020004@st.com> Date: Wed, 19 Dec 2007 15:28:00 -0000 From: Denis PILAT User-Agent: Thunderbird 2.0.0.9 (X11/20071031) MIME-Version: 1.0 To: Pierre Muller , gdb-patches@sourceware.org Cc: "'Denis PILAT'" Subject: Re: [RFA] TUI do not display current execution point References: <47691CE9.9020302@st.com> <001001c84246$ed9fb5b0$c8df2110$@u-strasbg.fr> <20071219150400.GB21477@caradoc.them.org> In-Reply-To: <20071219150400.GB21477@caradoc.them.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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-12/txt/msg00316.txt.bz2 You're both right, here is the new proposal: -- Denis 2007-12-19 Denis Pilat * tui/tui-data.h (MAX_LOCATOR_ELEMENT_LEN): Defined to a bigger value or to PATH_MAX when possible. Index: tui-data.h =================================================================== --- tui-data.h (revision 615) +++ tui-data.h (working copy) @@ -195,8 +195,11 @@ struct tui_command_element char *line; }; - -#define MAX_LOCATOR_ELEMENT_LEN 100 +#ifdef PATH_MAX +# define MAX_LOCATOR_ELEMENT_LEN PATH_MAX +#else +# define MAX_LOCATOR_ELEMENT_LEN 1024 +#endif /* Elements in the locator window content. */ struct tui_locator_element Daniel Jacobowitz wrote: > On Wed, Dec 19, 2007 at 02:56:18PM +0100, Pierre Muller wrote: > >> Code in gdb directory (utils.c and top.c) >> using PATH_MAX first check if that macro is defined. >> >> Shouldn't you do the same in that patch? >> > > Yes. Also, please correct the ChangeLog entry; you're changing > MAX_LOCATOR_ELEMENT_LEN so that goes in parentheses. > > Changing it to a bigger hardcoded constant is OK in this case, > although the right fix would be to remove the hardcoded length > (that's in the GNU Coding Standards, I think). > >