public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* Questioning the withdom of bundling gdb and insight
@ 2006-05-17  2:02 Mikhail Teterin
  2006-05-17 14:31 ` Keith Seitz
  0 siblings, 1 reply; 20+ messages in thread
From: Mikhail Teterin @ 2006-05-17  2:02 UTC (permalink / raw)
  To: insight

I thought, this was discussed already, but the list's archives don't show it.

What is the rationale behind bundling the entire gdb (which, in turn, bundled 
libiberty, bfd), the itcl and itk, etc. into one giant tarball?

Why can't these independent trees remain independent? You can even offer them 
all on your download site(s), but someone, who already has itk installed and 
gdb downloaded need not download the entire 20Mb of insight-6.4.tar.bz2. All 
she needs is a 800Kb of gdbtk and libgui tarred together...

No?

Thanks,

	-mi

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Questioning the withdom of bundling gdb and insight
  2006-05-17  2:02 Questioning the withdom of bundling gdb and insight Mikhail Teterin
@ 2006-05-17 14:31 ` Keith Seitz
  2006-05-17 17:50   ` Mikhail Teterin
                     ` (3 more replies)
  0 siblings, 4 replies; 20+ messages in thread
From: Keith Seitz @ 2006-05-17 14:31 UTC (permalink / raw)
  To: Mikhail Teterin; +Cc: insight

Mikhail Teterin wrote:

> What is the rationale behind bundling the entire gdb (which, in turn, bundled 
> libiberty, bfd), the itcl and itk, etc. into one giant tarball?

Because at one time, we maintained a large number of fixes to tcl, tk, 
and itcl. Gdb is included because insight is very tightly coupled to a 
particular version of gdb. [Although not so much as of late since no one 
is actively developing insight.]

> Why can't these independent trees remain independent? You can even offer them 
> all on your download site(s), but someone, who already has itk installed and 
> gdb downloaded need not download the entire 20Mb of insight-6.4.tar.bz2. All 
> she needs is a 800Kb of gdbtk and libgui tarred together...

I did once ask list members if people wanted the snapshots to be a giant 
tarball of everything or just the insight bits. The majority wanted the 
giant tarball:

http://sourceware.org/ml/insight/2004-q4/msg00116.html

Keith

PS. Patches welcome to build using external tcl, tk, itcl...

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Questioning the withdom of bundling gdb and insight
  2006-05-17 14:31 ` Keith Seitz
@ 2006-05-17 17:50   ` Mikhail Teterin
  2006-05-17 17:57     ` Dave Korn
       [not found]   ` <200605171330.50762.mi+mx@aldan.algebra.com>
                     ` (2 subsequent siblings)
  3 siblings, 1 reply; 20+ messages in thread
From: Mikhail Teterin @ 2006-05-17 17:50 UTC (permalink / raw)
  To: insight

ц⌠ц┘ц▓ц┘ц└ц│ 17 ц■ц▓ц│ц≈ц┘ц▌ц≤ 2006 10:27, Keith Seitz ц▌ц│ц░ц┴ц⌠ц│ц≈:
> Because at one time, we maintained a large number of fixes to tcl, tk, 
> and itcl.

Are these fixes still necessary? Were they submitted to the maintainers of the 
tcl, tk, and itcl projects respectively? Can the patches be downloaded 
separately for evaluation?

> The majority wanted the giant tarball:
>
> http://sourceware.org/ml/insight/2004-q4/msg00116.html

This link points to you asking the question and a SINGLE response from a 
person, who admitted to be a ``not a big "consumer of snapshots"''.

> PS. Patches welcome to build using external tcl, tk, itcl...

I'll build it -- just allow me (and the users of my work) to download only the 
pieces needed. I'd like to make a FreeBSD port of insight (and gdb*).

Our ports collection already builds tcl/tk, itcl/itk, iwidgets, gnulibiberty 
and other commonly used software -- there is no need for the insight port to 
have a private copy of all this.

	-mi

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Does insight work?
       [not found]   ` <200605171330.50762.mi+mx@aldan.algebra.com>
@ 2006-05-17 17:53     ` Keith Seitz
  2006-05-17 18:06       ` Mikhail Teterin
  0 siblings, 1 reply; 20+ messages in thread
From: Keith Seitz @ 2006-05-17 17:53 UTC (permalink / raw)
  To: Mikhail Teterin; +Cc: insight

Mikhail Teterin wrote:
> ?????? 17 ??????? 2006 10:27, Keith Seitz ???????:
>> no one is actively developing insight.
> 
> I built insight against the latest itk/itcl/iwidgets (3.3 and 4.01). It starts 
> (the first patches attached), but, mostly, does not work -- clicking Run or 
> File menus result in itk/tk exceptions.
> 
> Before digging into it deeper, is anyone, actually, using insight-6.4 to debug 
> things? Or should I stop trying to build it and concentrate on gdb and 
> gdbtui?

I don't think I have tried replacing itcl yet. Only tcl/tk. You can drop 
those in in-place.

Yes, as a matter of fact, I use insight almost daily. I even use the 
source that goes into the snapshots. Just yesterday afternoon I was 
using this: GNU gdb 6.4.50.20060515-cvs.

You haven't mention what your company's release platform is 
(linux,cygwin) or target architecture 
(linux,cygwin,mcore-elf,ppc-elf,etc), so I can't tell you if it could be 
a series of (probably gdb) bugs with your build.

Keith

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Questioning the withdom of bundling gdb and insight
       [not found]   ` <200605171337.30938.mi+mx@aldan.algebra.com>
@ 2006-05-17 17:55     ` Keith Seitz
  2006-05-17 18:11       ` Mikhail Teterin
  0 siblings, 1 reply; 20+ messages in thread
From: Keith Seitz @ 2006-05-17 17:55 UTC (permalink / raw)
  To: Mikhail Teterin; +Cc: insight

Mikhail Teterin wrote:
> ц⌠ц┘ц▓ц┘ц└ц│ 17 ц■ц▓ц│ц≈ц┘ц▌ц≤ 2006 10:27, Keith Seitz ц▌ц│ц░ц┴ц⌠ц│ц≈:
>> Because at one time, we maintained a large number of fixes to tcl, tk, 
>> and itcl.
> 
> Are these fixes still necessary? Were they submitted to the maintainers of the 
> tcl, tk, and itcl projects respectively? Can the patches be downloaded 
> separately for evaluation?

Note the wording. ".. at one time .." Our repository currently has 8.4.1 
  that was released by the Tcl consortium. We have two or three local 
modifications, but I think it is all configury to deal with /usr/lib vs 
/usr/share issues.

>> The majority wanted the giant tarball:
>>
>> http://sourceware.org/ml/insight/2004-q4/msg00116.html
> 
> This link points to you asking the question and a SINGLE response from a 
> person, who admitted to be a ``not a big "consumer of snapshots"''.

Hmm. Perhaps that's the wrong thread. Or maybe there were some messages
sent to me privately that never made it to the list. I don't recall any
more.

>> PS. Patches welcome to build using external tcl, tk, itcl...
> 
> I'll build it -- just allow me (and the users of my work) to download only the 
> pieces needed. I'd like to make a FreeBSD port of insight (and gdb*).

I don't have a problem with making insight-only snapshots available. Of
course, IMO, anonymous CVS is always available to do this.

Keith

^ permalink raw reply	[flat|nested] 20+ messages in thread

* RE: Questioning the withdom of bundling gdb and insight
  2006-05-17 17:50   ` Mikhail Teterin
@ 2006-05-17 17:57     ` Dave Korn
  0 siblings, 0 replies; 20+ messages in thread
From: Dave Korn @ 2006-05-17 17:57 UTC (permalink / raw)
  To: 'Mikhail Teterin', insight

On 17 May 2006 18:50, Mikhail Teterin wrote:

> середа 17 травень 2006 10:27, Keith Seitz написав:

>> The majority wanted the giant tarball:
>> 
>> http://sourceware.org/ml/insight/2004-q4/msg00116.html
> 
> This link points to you asking the question and a SINGLE response from a
> person, who admitted to be a ``not a big "consumer of snapshots"''.

  Heh, but one out of one is still a majority.  :-D

  Anyway, are we talking about snapshots or releases here?

> I'll build it -- just allow me (and the users of my work) to download only
> the pieces needed. I'd like to make a FreeBSD port of insight (and gdb*).
> 
> Our ports collection already builds tcl/tk, itcl/itk, iwidgets, gnulibiberty
> and other commonly used software -- there is no need for the insight port to
> have a private copy of all this.

  In the short term, you could always just check-out the individual subtrees
that you require from the sourceware CVS.


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Does insight work?
  2006-05-17 17:53     ` Does insight work? Keith Seitz
@ 2006-05-17 18:06       ` Mikhail Teterin
  2006-05-17 18:08         ` Keith Seitz
  0 siblings, 1 reply; 20+ messages in thread
From: Mikhail Teterin @ 2006-05-17 18:06 UTC (permalink / raw)
  To: Keith Seitz; +Cc: insight

ц⌠ц┘ц▓ц┘ц└ц│ 17 ц■ц▓ц│ц≈ц┘ц▌ц≤ 2006 13:53, Keith Seitz ц▌ц│ц░ц┴ц⌠ц│ц≈:
> You haven't mention what your company's release platform is
> (linux,cygwin) or target architecture
> (linux,cygwin,mcore-elf,ppc-elf,etc), so I can't tell you if it could be
> a series of (probably gdb) bugs with your build.

As I have mentioned, the built gdb and gdbtui seem to work -- it is only the 
insight (GUI), that responds with Tcl errors to mouse clicks. If the GUI 
works for you, than it must be some more incompatibilities with the more 
recent (only a year old) itcl and itk. I be digging...

The platform is FreeBSD -- mostly 6.1, mostly on i386 and amd64 (known as 
x86_64 in the Linux world), but also other releases and hardware platforms 
(sparc64, alpha).

	-mi

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Does insight work?
  2006-05-17 18:06       ` Mikhail Teterin
@ 2006-05-17 18:08         ` Keith Seitz
  2006-05-17 18:15           ` Mikhail Teterin
  0 siblings, 1 reply; 20+ messages in thread
From: Keith Seitz @ 2006-05-17 18:08 UTC (permalink / raw)
  To: Mikhail Teterin; +Cc: insight

Mikhail Teterin wrote:

> As I have mentioned, the built gdb and gdbtui seem to work -- it is only the 
> insight (GUI), that responds with Tcl errors to mouse clicks. If the GUI 
> works for you, than it must be some more incompatibilities with the more 
> recent (only a year old) itcl and itk. I be digging...

What kind of exceptions? Maybe something will jog a memory somewhere in 
the depths of my mind.

> The platform is FreeBSD -- mostly 6.1, mostly on i386 and amd64 (known as 
> x86_64 in the Linux world), but also other releases and hardware platforms 
> (sparc64, alpha).

Ah, okay. All those should be pretty "sane" platforms.

Keith

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Questioning the withdom of bundling gdb and insight
  2006-05-17 17:55     ` Questioning the withdom of bundling gdb and insight Keith Seitz
@ 2006-05-17 18:11       ` Mikhail Teterin
  2006-05-17 18:20         ` Keith Seitz
  0 siblings, 1 reply; 20+ messages in thread
From: Mikhail Teterin @ 2006-05-17 18:11 UTC (permalink / raw)
  To: Keith Seitz; +Cc: insight

ц⌠ц┘ц▓ц┘ц└ц│ 17 ц■ц▓ц│ц≈ц┘ц▌ц≤ 2006 13:55, Keith Seitz ц▌ц│ц░ц┴ц⌠ц│ц≈:
> I don't have a problem with making insight-only snapshots available. Of
> course, IMO, anonymous CVS is always available to do this.

I don't realy care for snapshots as I don't intend my port for people working 
ON insight/gdb -- only for those working WITH it.

But I'd like the released pieces to be available by themselves -- without the 
accompanying other stuff, that's already ported and available.

I made my own tarball with gdb/gdbtk and libgui -- it is under a megabyte 
bzip2-ed.

If you feel, the users should be able to download everything needed from one 
location, you can add your server to the list of Tcl/Tk and Itcl/Itk 
mirrors :-)

Thanks!

	-mi

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Does insight work?
  2006-05-17 18:08         ` Keith Seitz
@ 2006-05-17 18:15           ` Mikhail Teterin
  2006-05-17 18:27             ` Keith Seitz
  0 siblings, 1 reply; 20+ messages in thread
From: Mikhail Teterin @ 2006-05-17 18:15 UTC (permalink / raw)
  To: Keith Seitz; +Cc: insight

ц⌠ц┘ц▓ц┘ц└ц│ 17 ц■ц▓ц│ц≈ц┘ц▌ц≤ 2006 14:07, Keith Seitz ц▌ц│ц░ц┴ц⌠ц│ц≈:
> What kind of exceptions? Maybe something will jog a memory somewhere in
> the depths of my mind.

Clicking on the "File" menu, for example results in the following 
immediately -- without ever bring up the menu:

invalid command name "::.srcwin0.srcwin.container.pane0.childsite.con"
    while executing
"::.srcwin0.srcwin.container.pane0.childsite.con _post file"
    (in namespace inscope "::SrcBar" script line 1)
    invoked from within
"namespace inscope ::SrcBar {::.srcwin0.srcwin.container.pane0.childsite.con 
_post file}"
    invoked from within
"{.srcwin0.#srcwin0#srcwin#container#pane0#childsite#con#menubar#m.#srcwin0#srcwin#container#pane0#childsite#con#menubar#m#file} 
post 659 315"
    invoked from within
"$menu postcascade active"
    (procedure "tk::MenuButtonDown" line 8)
    invoked from within
"tk::MenuButtonDown .srcwin0.#srcwin0#srcwin#container#pane0#childsite#con#menubar#m"
    (command bound to event)errorCode is NONE

BTW, if DISPLAY is not set, insight dumps core on startup, because it passes a 
NULL interp-pointer to the Tcl library:

#0  Tcl_GlobalEval (interp=0x0, 
    command=0x7ccc60 "proc gdbtk_find_main {} {\n    global Paths 
GDBTK_LIBRARY
env\n    rename gdbtk_find_main {}\n    if {[info exists env(DEBUG_STUB)]} {\n 
      source $env(DEBUG_STUB)\n        debugger_init\n        set de"...)
    at ./../generic/tclBasic.c:5441

Yours,

	-mi

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Questioning the withdom of bundling gdb and insight
  2006-05-17 18:11       ` Mikhail Teterin
@ 2006-05-17 18:20         ` Keith Seitz
  2006-05-17 18:31           ` Mikhail Teterin
  0 siblings, 1 reply; 20+ messages in thread
From: Keith Seitz @ 2006-05-17 18:20 UTC (permalink / raw)
  To: Mikhail Teterin; +Cc: insight

Mikhail Teterin wrote:
> ?????? 17 ??????? 2006 13:55, Keith Seitz ???????:
>> I don't have a problem with making insight-only snapshots available. Of
>> course, IMO, anonymous CVS is always available to do this.
> 
> I don't realy care for snapshots as I don't intend my port for people working 
> ON insight/gdb -- only for those working WITH it.

You can always use a CVS release branch. All releases are tagged 
(gdb_MAJOR_MINOR-branch -- gdb_6_5-branch was just created).

> But I'd like the released pieces to be available by themselves -- without the 
> accompanying other stuff, that's already ported and available.
> 
> I made my own tarball with gdb/gdbtk and libgui -- it is under a megabyte 
> bzip2-ed.
> 
> If you feel, the users should be able to download everything needed from one 
> location, you can add your server to the list of Tcl/Tk and Itcl/Itk 
> mirrors :-)

Believe me when I say, I have wanted to remove the requirement of using 
pre-packaged tcl, tk, and itcl for a LONG time. You know, I may just 
stop talking about it and do it. How hard can the first two be, anyway? 
(Famous last words)

Then I could make an insight RPM. :-)

Keith

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Does insight work?
  2006-05-17 18:15           ` Mikhail Teterin
@ 2006-05-17 18:27             ` Keith Seitz
  2006-05-17 18:41               ` Mikhail Teterin
  2006-05-17 19:03               ` Single-executable patch Mikhail Teterin
  0 siblings, 2 replies; 20+ messages in thread
From: Keith Seitz @ 2006-05-17 18:27 UTC (permalink / raw)
  To: Mikhail Teterin; +Cc: insight

Mikhail Teterin wrote:
> ?????? 17 ??????? 2006 14:07, Keith Seitz ???????:
>> What kind of exceptions? Maybe something will jog a memory somewhere in
>> the depths of my mind.
> 
> Clicking on the "File" menu, for example results in the following 
> immediately -- without ever bring up the menu:
> 
> invalid command name "::.srcwin0.srcwin.container.pane0.childsite.con"
>     while executing
> "::.srcwin0.srcwin.container.pane0.childsite.con _post file"
>     (in namespace inscope "::SrcBar" script line 1)
>     invoked from within
> "namespace inscope ::SrcBar {::.srcwin0.srcwin.container.pane0.childsite.con 
> _post file}"
>     invoked from within
> "{.srcwin0.#srcwin0#srcwin#container#pane0#childsite#con#menubar#m.#srcwin0#srcwin#container#pane0#childsite#con#menubar#m#file} 
> post 659 315"
>     invoked from within
> "$menu postcascade active"
>     (procedure "tk::MenuButtonDown" line 8)
>     invoked from within
> "tk::MenuButtonDown .srcwin0.#srcwin0#srcwin#container#pane0#childsite#con#menubar#m"
>     (command bound to event)errorCode is NONE

Hmm. That looks unusual. Almost as if Tk doesn't work all of a sudden. 
Almost all that is bound to Tk commands for menu processing... Weird.

Are the versions of itcl and tk compatible? I can't think of anything 
off the top of my head that would cause that behavior. But then I 
haven't tried the latest itcl stuff yet. Just tcl and tk.

> BTW, if DISPLAY is not set, insight dumps core on startup, because it passes a 
> NULL interp-pointer to the Tcl library:
> 
> #0  Tcl_GlobalEval (interp=0x0, 
>     command=0x7ccc60 "proc gdbtk_find_main {} {\n    global Paths 
> GDBTK_LIBRARY
> env\n    rename gdbtk_find_main {}\n    if {[info exists env(DEBUG_STUB)]} {\n 
>       source $env(DEBUG_STUB)\n        debugger_init\n        set de"...)
>     at ./../generic/tclBasic.c:5441

Ugh! Bit rot. That should just cause insight to either revert to GDB 
(old behavior, I think) or print out a message. Grr. I'll check in a patch.

Keith

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Questioning the withdom of bundling gdb and insight
  2006-05-17 18:20         ` Keith Seitz
@ 2006-05-17 18:31           ` Mikhail Teterin
  0 siblings, 0 replies; 20+ messages in thread
From: Mikhail Teterin @ 2006-05-17 18:31 UTC (permalink / raw)
  To: Keith Seitz; +Cc: insight

ц⌠ц┘ц▓ц┘ц└ц│ 17 ц■ц▓ц│ц≈ц┘ц▌ц≤ 2006 14:20, Keith Seitz ц▌ц│ц░ц┴ц⌠ц│ц≈:
> You can always use a CVS release branch. All releases are tagged
> (gdb_MAJOR_MINOR-branch -- gdb_6_5-branch was just created).

I like to rely on the extensive rounds of pre-release testing :-), instead of 
taking the not neccessarily working stuff hot from CVS.

> Believe me when I say, I have wanted to remove the requirement of using 
> pre-packaged tcl, tk, and itcl for a LONG time.

Please, do detach from the gdb itself -- that's 14Mb of the current insight's 
20Mb. I know, it is tightly coupled, and should be built together, but there 
is no point to download them together too...

Yours,

	-mi

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Does insight work?
  2006-05-17 18:27             ` Keith Seitz
@ 2006-05-17 18:41               ` Mikhail Teterin
  2006-05-17 19:03               ` Single-executable patch Mikhail Teterin
  1 sibling, 0 replies; 20+ messages in thread
From: Mikhail Teterin @ 2006-05-17 18:41 UTC (permalink / raw)
  To: Keith Seitz; +Cc: insight

ц⌠ц┘ц▓ц┘ц└ц│ 17 ц■ц▓ц│ц≈ц┘ц▌ц≤ 2006 14:26, Keith Seitz ц▌ц│ц░ц┴ц⌠ц│ц≈:
> Are the versions of itcl and tk compatible?

With what? With each other? Yes, they are -- tkdesk-2.0p2 works fine (although 
tkdesk-2.0 did not).

With insight -- evidently, not :-) These are itcl and itk versions 3.3 
released in April 2005.

> I can't think of anything off the top of my head that would cause that
> behavior. But then I haven't tried the latest itcl stuff yet. Just tcl and
> tk.

Ok, maybe we can figure it out here too.

> Ugh! Bit rot. That should just cause insight to either revert to GDB 
> (old behavior, I think) or print out a message. Grr. I'll check in a patch.

Thanks! There is also a problem with insight quietly exiting (with code 1), 
when it can not find a usable main.tcl -- it should be printing Tcl's error 
message, but it does not requiring a debugger step-through to figure out, 
what's wrong.

Yours,

	-mi

	-mi

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Single-executable patch
  2006-05-17 18:27             ` Keith Seitz
  2006-05-17 18:41               ` Mikhail Teterin
@ 2006-05-17 19:03               ` Mikhail Teterin
  2006-05-17 19:07                 ` Daniel Jacobowitz
  2006-05-17 20:32                 ` Eli Zaretskii
  1 sibling, 2 replies; 20+ messages in thread
From: Mikhail Teterin @ 2006-05-17 19:03 UTC (permalink / raw)
  To: insight, gdb-patches

[-- Attachment #1: Type: text/plain, Size: 640 bytes --]

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.

Yours,

	-mi

[-- Attachment #2: patch-unified --]
[-- Type: text/x-diff, Size: 661 bytes --]

--- gdb/gdb.c	Thu Feb 13 13:07:24 2003
+++ gdb/gdb.c	Wed May 17 00:24:39 2006
@@ -23,4 +23,5 @@
 #include "gdb_string.h"
 #include "interps.h"
+#include <libgen.h>
 
 int
@@ -31,6 +32,14 @@
   args.argc = argc;
   args.argv = argv;
-  args.use_windows = 0;
-  args.interpreter_p = INTERP_CONSOLE;
+  if (strncmp(basename(argv[0]), "insight", 7) == 0) {
+    args.use_windows = 1;
+    args.interpreter_p = "insight";
+  } else if (strncmp(basename(argv[0]), "gdbtui", 6) == 0) {
+    args.use_windows = 0;
+    args.interpreter_p = INTERP_TUI;
+  } else {
+    args.use_windows = 0;
+    args.interpreter_p = INTERP_CONSOLE;
+  }
   return gdb_main (&args);
 }

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Single-executable patch
  2006-05-17 19:03               ` Single-executable patch Mikhail Teterin
@ 2006-05-17 19:07                 ` Daniel Jacobowitz
  2006-05-17 19:28                   ` Mikhail Teterin
  2006-05-17 20:32                 ` Eli Zaretskii
  1 sibling, 1 reply; 20+ messages in thread
From: Daniel Jacobowitz @ 2006-05-17 19:07 UTC (permalink / raw)
  To: Mikhail Teterin; +Cc: insight, gdb-patches

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

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Single-executable patch
  2006-05-17 19:07                 ` Daniel Jacobowitz
@ 2006-05-17 19:28                   ` Mikhail Teterin
  2006-05-17 19:35                     ` Daniel Jacobowitz
  0 siblings, 1 reply; 20+ messages in thread
From: Mikhail Teterin @ 2006-05-17 19:28 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: insight, gdb-patches

ц⌠ц┘ц▓ц┘ц└ц│ 17 ц■ц▓ц│ц≈ц┘ц▌ц≤ 2006 15:07, Daniel Jacobowitz ц▌ц│ц░ц┴ц⌠ц│ц≈:
> This has been a world of trouble for other programs in the past,

I wonder, what kind of trouble?

> and I do not recommend it; we switched to the separate main programs
> deliberately IIRC.

The current main() functions are almost "too simple" now -- may it be, that 
something like my patch is *no longer* troublesome?

> If this is all you want, here's a simple implementation:
>
> /usr/bin/gdbtui:
> #!/usr/bin/gdb -i=tui

Cool! I wonder, why even bother linking other executables... It would make 
sense to do it, if, for example, the gdb was not linking with Tcl and 
friends, but it does anyway...

Thanks!

	-mi

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Single-executable patch
  2006-05-17 19:28                   ` Mikhail Teterin
@ 2006-05-17 19:35                     ` Daniel Jacobowitz
  0 siblings, 0 replies; 20+ messages in thread
From: Daniel Jacobowitz @ 2006-05-17 19:35 UTC (permalink / raw)
  To: Mikhail Teterin; +Cc: insight, gdb-patches

On Wed, May 17, 2006 at 03:27:35PM -0400, Mikhail Teterin wrote:
> ?????? 17 ??????? 2006 15:07, Daniel Jacobowitz ???????:
> > This has been a world of trouble for other programs in the past,
> 
> I wonder, what kind of trouble?

Portability.  There are many other platforms out there and many of them
are very strange...

> > If this is all you want, here's a simple implementation:
> >
> > /usr/bin/gdbtui:
> > #!/usr/bin/gdb -i=tui
> 
> Cool! I wonder, why even bother linking other executables... It would make 
> sense to do it, if, for example, the gdb was not linking with Tcl and 
> friends, but it does anyway...

It's easier if you only want one of them, and if you aren't installing
in fixed paths.  Portably locating the invoked shell script is also a
bit tricky.

-- 
Daniel Jacobowitz
CodeSourcery

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Single-executable patch
  2006-05-17 19:03               ` Single-executable patch Mikhail Teterin
  2006-05-17 19:07                 ` Daniel Jacobowitz
@ 2006-05-17 20:32                 ` Eli Zaretskii
  1 sibling, 0 replies; 20+ messages in thread
From: Eli Zaretskii @ 2006-05-17 20:32 UTC (permalink / raw)
  To: Mikhail Teterin; +Cc: insight, gdb-patches

> 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.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Questioning the withdom of bundling gdb and insight
  2006-05-17 14:31 ` Keith Seitz
                     ` (2 preceding siblings ...)
       [not found]   ` <200605171337.30938.mi+mx@aldan.algebra.com>
@ 2007-06-29  0:56   ` Mikhail Teterin
  3 siblings, 0 replies; 20+ messages in thread
From: Mikhail Teterin @ 2007-06-29  0:56 UTC (permalink / raw)
  To: Keith Seitz; +Cc: insight

On ц⌠ц┘ц▓ц┘ц└ц│ 17 ц■ц▓ц│ц≈ц┘ц▌ц≤ 2006, Keith Seitz wrote:
= PS. Patches welcome to build using external tcl, tk, itcl...

The patch for the itcl code, to make it work with ITcl/ITk-3.3 can be found 
here:

http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/gdb6/files/itcl33-patch?rev=HEAD;content-type=text%2Fplain

FreeBSD port of gdb can now be (optionally) built with Insight. If the 
GUI-option is enabled, the following additional flags are passed to gdb's 
configure:

	--enable-gdbtk  --with-tclconfig=/usr/local/lib/tcl8.4	\
	--with-tclinclude=/usr/local/include/tcl8.4/generic	\
	--with-tkconfig=/usr/local/lib/tk8.4	\
	--with-tkinclude=/usr/local/include/tk8.4/generic	\
	--with-itclconfig=/usr/local/lib/itcl3.3	\
	--with-itkconfig=/usr/local/lib/itk3.3

Note, that the obsolete version of itcl (and itk) bundled with insight is not 
extracted. Instead, headers of ITcl and ITk 3.3 headers are sym-linked into 
the (otherwise empty) itcl/generic subdirectory.

To spare the FreeBSD users the need to download the entire insight (22Mb), I 
rolled my own tarball, which contains _only_ the gdb/gdbtk and the libgui 
subdirectories of the distribution (845Kb):

	http://aldan.algebra.com/~mi/gdbtk-6.6.tar.bz2

This is extracted on top of the gdb-6.6 sources, if the user asks for the GUI 
option.

Please, consider upgrading your GUI code to ITcl/ITk-3.3 using the patch 
provided.

Please, independently consider abandoning the practice of bundling 
ITcl/IWidgets with Insight.

Please, independently consider releasing the Insight's _extra code_ in 
_addition_ to the gdb tarball, instead of bundling gdb sources inside 
Insight's.

Thank you,

	-mi

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2007-06-29  0:56 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-17  2:02 Questioning the withdom of bundling gdb and insight Mikhail Teterin
2006-05-17 14:31 ` Keith Seitz
2006-05-17 17:50   ` Mikhail Teterin
2006-05-17 17:57     ` Dave Korn
     [not found]   ` <200605171330.50762.mi+mx@aldan.algebra.com>
2006-05-17 17:53     ` Does insight work? Keith Seitz
2006-05-17 18:06       ` Mikhail Teterin
2006-05-17 18:08         ` Keith Seitz
2006-05-17 18:15           ` Mikhail Teterin
2006-05-17 18:27             ` Keith Seitz
2006-05-17 18:41               ` Mikhail Teterin
2006-05-17 19:03               ` Single-executable patch Mikhail Teterin
2006-05-17 19:07                 ` Daniel Jacobowitz
2006-05-17 19:28                   ` Mikhail Teterin
2006-05-17 19:35                     ` Daniel Jacobowitz
2006-05-17 20:32                 ` Eli Zaretskii
     [not found]   ` <200605171337.30938.mi+mx@aldan.algebra.com>
2006-05-17 17:55     ` Questioning the withdom of bundling gdb and insight Keith Seitz
2006-05-17 18:11       ` Mikhail Teterin
2006-05-17 18:20         ` Keith Seitz
2006-05-17 18:31           ` Mikhail Teterin
2007-06-29  0:56   ` Mikhail Teterin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).