bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch for debugapp.in


From: Nicola Pero
Subject: Re: Patch for debugapp.in
Date: Sun, 7 Dec 2003 15:03:03 +0000 (GMT)

> >>won't display source lists correctly, and thus its use doesn't
> >>make much sense.
> >>
> >>I hope some people find it convenient.
> >>
> >>
> >
> >Thanks.  Interesting point.
> >
> >What about 
> >
> >export GDB=xgdb
> >debugapp <your_application>.debug
> >
> >or even
> >
> >GDB=xgdb debugapp <your_application>.debug
> >
> >that should do the same.
> >
> I'm sorry you miss the point.  So, give me another try.
> 
> I think it depends on the design policy of debugapp which is better.
> It's OK if debugapp guarantees the _trivial_ hack above always works
> and if it also allows the user to exploit its internal variables freely.
> I wrote the patch because I thought few programmer approves the latter.

Setting GDB is certainly not a hack - it's supposed to be a public
variable.  But I know nothing is documented, so how the hell you know it's
a public variable ? :-)

I'd say it's public because it's all uppercase, and because the script is
testing that it's not set before setting it, and because its only obvious
use is to let people override the default debugger with their own. :-)

Using shell env variables is also good, because if you always want to use
xgdb, you can add 'export GDB=xgdb' to your .bash_profile, and then you
don't need to pass the flag --gui=xgdb to debugapp every time you invoke
it.
 
On the other hand, you could also use "alias debugapp='debugapp
--gui=xgdb", so your flag could be used in that way too.

It seems you feel that the flag is cleaner -- which is fine, I'm happy to
add your patch -- then people can either use GDB=xgdb, or use a command
line flag.  We can support both.

There is only one change I'd like to do -- instead of calling the flag
--gui=..., I'd like to call it --gdb=..., for consistency with GDB=...

Does that sound acceptable to you ?

I know, maybe we should call the variables/flags DEBUGGER and
--debugger=..., but historically it's called GDB and it doesn't look like
a good idea to change it, as someone might be using it.

If using --gdb=... instead of --gui=... sounds acceptable to you, I'll 
commit your patch as soon as I can.  CVS is unfortunately still down.


> So, if debugapp guarantees that the hack above always works, I think
> it should be documented somewhere just like autoconf's INSTALL, with
> which we can understand which environmental variable is permitted to
> be overridden to control the behavior of the shell script 'configure.'
> That's an approval policy, isn't that?  If so did it, I wouldn't write
> the patch all the way to bother you.

I'm confused about these last sentences - you're certainly not bothering
me by sending in patches :-) anyway I agree stuff should be documented.  
If you have a patch documenting stuff, it's welcome!

Thanks for your help and for taking the time to discuss this stuff with 
me.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]