From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6454 invoked by alias); 17 May 2006 20:32:33 -0000 Received: (qmail 6445 invoked by uid 22791); 17 May 2006 20:32:33 -0000 X-Spam-Check-By: sourceware.org Received: from nitzan.inter.net.il (HELO nitzan.inter.net.il) (192.114.186.20) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 17 May 2006 20:32:32 +0000 Received: from HOME-C4E4A596F7 (IGLD-80-230-44-20.inter.net.il [80.230.44.20]) by nitzan.inter.net.il (MOS 3.7.3-GA) with ESMTP id DJV96678 (AUTH halo1); Wed, 17 May 2006 23:32:22 +0300 (IDT) Date: Wed, 17 May 2006 20:32:00 -0000 Message-Id: From: Eli Zaretskii To: Mikhail Teterin CC: insight@sourceware.org, gdb-patches@sources.redhat.com In-reply-to: <200605171502.18798.mi+mx@aldan.algebra.com> (message from Mikhail Teterin on Wed, 17 May 2006 15:02:18 -0400) Subject: Re: Single-executable patch Reply-to: Eli Zaretskii References: <200605162201.33772.mi+mx@aldan.algebra.com> <200605171415.24053.mi+mx@aldan.algebra.com> <446B6AE7.7030200@redhat.com> <200605171502.18798.mi+mx@aldan.algebra.com> Mailing-List: contact insight-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: insight-owner@sourceware.org X-SW-Source: 2006-q2/txt/msg00042.txt.bz2 > From: Mikhail Teterin > Date: Wed, 17 May 2006 15:02:18 -0400 > > It seems, all three of the gdb, gdbtui, and insight executables are the same > except for their (tiny) main() functions. > > The attached sample patch allows to install just the gdb and link it to gdbtui > and insight -- the program will behave differently depending on the name, > under which it is invoked. This is against the GNU coding standards. From standards.info: Please don't make the behavior of a utility depend on the name used to invoke it. It is useful sometimes to make a link to a utility with a different name, and that should not change what it does. Instead, use a run time option or a compilation switch or both to select among the alternate behaviors.