This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
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.
/* 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
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |