From: Andrew Cagney <ac131313@redhat.com>
To: Daniel Jacobowitz <drow@mvista.com>, Joel Brobecker <brobecker@gnat.com>
Cc: Eli Zaretskii <eliz@elta.co.il>, gdb-patches@sources.redhat.com
Subject: Re: [RFA/RFC] Problem with '!' escaping with zsh/bash/ksh
Date: Mon, 05 May 2003 19:29:00 -0000 [thread overview]
Message-ID: <3EB6BBAF.5080504@redhat.com> (raw)
In-Reply-To: <20030503165915.GA16323@nevyn.them.org>
Joel, testcase?
I was going to suggest gdb.base/args.exp but someone's already added that.
Consider an addition to that existing test case pre-approved (and any
other evil combinations you come up with).
Anyway, as best I can tell the technical issues were resolved, so yes,
approved.
Andrew
>> I think you are right to say that "\a" is equivalent to "a" in general.
>> However, in our case, the argument is quoted, specifically single-quoted.
>> And it seems to make a big difference: with single quotes, the
>> expression is no longer evaluated. That's why the backslash becomes
>> harmful.
>>
>> Daniel said:
>
>> > By the way... what would the general reaction be to supporting exec'ing
>> > the program directly instead of through the shell? At least as an
>> > option, since it would be a bit of an interface/quoting change?
>
>>
>> I think that'd be very nice, actually. Can somebody tell me what the
>> advantage of forking via a shell is?
>
>
> Globbing, primarily; and it handles some complexities of quoting (but
> introduces others!).
>
> Me, I think on modern systems we can just do argument splitting
> and globbing ourselves if we want to. It's more efficient and less
> fragile.
Hmm, this came up ``recently'', "inferior.h" contains:
/* If STARTUP_WITH_SHELL is set, GDB's "run"
will attempts to start up the debugee under a shell.
This is in order for argument-expansion to occur. E.g.,
(gdb) run *
The "*" gets expanded by the shell into a list of files.
While this is a nice feature, it turns out to interact badly
with some of the catch-fork/catch-exec features we have added.
In particular, if the shell does any fork/exec's before
the exec of the target program, that can confuse GDB.
To disable this feature, set STARTUP_WITH_SHELL to 0.
To enable this feature, set STARTUP_WITH_SHELL to 1.
The catch-exec traps expected during start-up will
be 1 if target is not started up with a shell, 2 if it is.
- RT
If you disable this, you need to decrement
START_INFERIOR_TRAPS_EXPECTED in tm.h. */
#define STARTUP_WITH_SHELL 1
#if !defined(START_INFERIOR_TRAPS_EXPECTED)
#define START_INFERIOR_TRAPS_EXPECTED 2
#endif
http://sources.redhat.com/ml/gdb-patches/2002-04/msg00759.html
Andrew
next prev parent reply other threads:[~2003-05-05 19:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-02 23:35 Joel Brobecker
2003-05-03 8:39 ` Eli Zaretskii
2003-05-03 14:34 ` Daniel Jacobowitz
2003-05-03 16:51 ` Joel Brobecker
2003-05-03 16:59 ` Daniel Jacobowitz
2003-05-05 19:29 ` Andrew Cagney [this message]
2003-05-08 18:11 ` Joel Brobecker
2003-05-21 23:40 ` Joel Brobecker
2003-05-22 17:50 ` Andrew Cagney
2003-05-24 7:40 ` Eli Zaretskii
2003-05-03 19:00 ` 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=3EB6BBAF.5080504@redhat.com \
--to=ac131313@redhat.com \
--cc=brobecker@gnat.com \
--cc=drow@mvista.com \
--cc=eliz@elta.co.il \
--cc=gdb-patches@sources.redhat.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