From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4680 invoked by alias); 14 Aug 2006 21:20:20 -0000 Received: (qmail 4670 invoked by uid 22791); 14 Aug 2006 21:20:19 -0000 X-Spam-Check-By: sourceware.org Received: from romy.inter.net.il (HELO romy.inter.net.il) (192.114.186.66) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 14 Aug 2006 21:20:18 +0000 Received: from HOME-C4E4A596F7 (IGLD-80-230-164-15.inter.net.il [80.230.164.15]) by romy.inter.net.il (MOS 3.7.3-GA) with ESMTP id FMT91988 (AUTH halo1); Tue, 15 Aug 2006 00:20:11 +0300 (IDT) Date: Mon, 14 Aug 2006 21:20:00 -0000 Message-Id: From: Eli Zaretskii To: Jan Kratochvil CC: gdb@sourceware.org In-reply-to: <20060814150628.GA24544@host0.dyn.jankratochvil.net> (message from Jan Kratochvil on Mon, 14 Aug 2006 17:06:28 +0200) Subject: Re: Debugging through exec() (Linux MAY_FOLLOW_EXEC) Reply-to: Eli Zaretskii References: <20060614142552.GA15021@nevyn.them.org> <20060615203519.GA9603@host0.dyn.jankratochvil.net> <20060721181556.GA9150@lace.redhat.com> <20060721184421.GA22820@nevyn.them.org> <20060722123102.GA1936@lace.redhat.com> <20060724190332.GA13612@nevyn.them.org> <20060729185317.GA16200@host0.dyn.jankratochvil.net> <200607312038.k6VKchKj018729@elgar.sibelius.xs4all.nl> <20060805164144.GA23819@host0.dyn.jankratochvil.net> <20060808160113.GC21032@nevyn.them.org> <20060814150628.GA24544@host0.dyn.jankratochvil.net> X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-08/txt/msg00119.txt.bz2 > Date: Mon, 14 Aug 2006 17:06:28 +0200 > From: Jan Kratochvil > Cc: Daniel Jacobowitz > > please review the proposed functionality to be able to debug though exec(). Thanks. Please wait for others to comment; what's below are relatively minor comments. > + if (filename_new != NULL && > + (exec_bfd == NULL || strcmp (get_exec_file (0), filename_new))) Please don't use literal strcmp for file names; use FILENAME_CMP instead. That's because of case-insensitive file systems and other similar complications with file-name comparisons. The assumption that file names are just strings is non-portable. > + printf_unfiltered (_("Restoring the program name before exec().\n")); Please don't use "exec()" to indicate that it's a function: it looks like a call to `exec' with no arguments, which is not what you want. Just `exec' (with single quotes) is all you need. > + if (filename_new != NULL && (symfile_objfile == NULL > + || strcmp (symfile_objfile->name, filename_new))) File-name comparison again. > + printf_unfiltered (_("Restoring the symbol table before exec().\n")); "exec()" again. Finally, if this change has user-visible effects, it should be accompanied by a suitable change in NEWS and the user manual.