Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Mikhail Teterin <mi+mx@aldan.algebra.com>
Cc: insight@sourceware.org, gdb-patches@sources.redhat.com
Subject: Re: Single-executable patch
Date: Wed, 17 May 2006 19:28:00 -0000	[thread overview]
Message-ID: <20060517190737.GB12559@nevyn.them.org> (raw)
In-Reply-To: <200605171502.18798.mi+mx@aldan.algebra.com>

On Wed, May 17, 2006 at 03:02:18PM -0400, Mikhail Teterin wrote:
> 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 saves not only the disk space (3.2Mb per executable here on FreeBSD/amd64 
> despite using shared -ltcl, -ltk, -litcl, and -litk), but the more precious 
> RAM at runtime too -- when different users run different interfaces on a 
> shared system, the OS will be able to efficiently share the read-only pages 
> between them.

This has been a world of trouble for other programs in the past, and I
do not recommend it; we switched to the separate main programs
deliberately IIRC.

If this is all you want, here's a simple implementation:

/usr/bin/gdbtui:
#!/usr/bin/gdb -i=tui

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2006-05-17 19:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200605162201.33772.mi+mx@aldan.algebra.com>
     [not found] ` <200605171415.24053.mi+mx@aldan.algebra.com>
     [not found]   ` <446B6AE7.7030200@redhat.com>
2006-05-17 19:03     ` Mikhail Teterin
2006-05-17 19:28       ` Daniel Jacobowitz [this message]
2006-05-17 19:35         ` Mikhail Teterin
2006-05-17 20:23           ` Daniel Jacobowitz
2006-05-17 21:35       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060517190737.GB12559@nevyn.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=insight@sourceware.org \
    --cc=mi+mx@aldan.algebra.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox