From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Tromey To: david@llamedos.org Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH] specify arguments to debugee from commandline (second try) Date: Thu, 12 Apr 2001 08:26:00 -0000 Message-id: <87g0feyvt5.fsf@creche.redhat.com> References: <20010330163603.A27435@llamedos.org> <20010403013600.B7630@llamedos.org> <87n19uirbk.fsf@creche.redhat.com> <200104060832.EAA17613@indy.delorie.com> <87vgoi58lr.fsf@creche.redhat.com> <200104061626.MAA01438@indy.delorie.com> <87ofu96gop.fsf@creche.redhat.com> <200104062013.QAA11798@indy.delorie.com> <20010411013553.B2397@llamedos.org> <200104110855.EAA32225@delorie.com> <20010411221401.A3294@llamedos.org> X-SW-Source: 2001-04/msg00117.html >>>>> "David" == David Deephanphongs writes: David> I'm still not convinced that it's appropriate for /gdb/ to do David> the escaping - if it's being put into a script, it's much David> easier to do it in perl than C.. I won't claim that what I want is best. I can only claim that my suggestions support my goals. I do think my goals are reasonable. First, my primary use for a feature like this is in scripts and other places where a program gets launched. While it might be useful interactively, I don't think that is the most important use. This is why I'm for putting the executable name after the `--': I think it is more important to design for the script case than for the interactive case. Requiring the caller to do the quoting means that scripts will never invoke gdb directly. Instead I'll have to write another program to wrap gdb and quote the command line for me. That seems needless, especially given that requiring interactive users to quote the command line will suck. For instance, you can't type gdb foo -- ' a b c ' Instead you must type gdb foo -- '\ a\ b\ c\ ' I can't really call this intuitive or friendly. Sure, you can use the wrapper program interactively too. But that seems weird: if you want to use this feature, you always have to use a wrapper program. Why not just build it the convenient way the first time? David> What characters need to be escaped, anyway? It seems like it David> much differ from shell to shell. On Unix it doesn't really differ very much. For most common shells you can simply quote all the weird characters with `\'. Tom