This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Single-executable patch
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Mikhail Teterin <mi+mx at aldan dot algebra dot com>
- Cc: insight at sourceware dot org, gdb-patches at sources dot redhat dot com
- Date: Wed, 17 May 2006 23:32:28 +0300
- Subject: Re: Single-executable patch
- 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>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> From: Mikhail Teterin <mi+mx@aldan.algebra.com>
> 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.