[PATCH] specify arguments to debugee from commandline (second try)
Eli Zaretskii
eliz@is.elta.co.il
Thu Jun 7 00:00:00 GMT 2001
On Thu, 7 Jun 2001, David Deephanphongs wrote:
> GDB will escape the following characters within an inferior argument:
> ^|&#<>\"'`$*?[](); \{}
> ^----space
The function which implements this should be OS-dependent. What you
wrote might work for /bin/sh, but not for non-Posix systems such as
MS-Windows.
To avoid ugly OS-specific #ifdef's, perhaps we should add a hook function
pointer whcih a port could set to point to its private function. Then
the code you wrote could be the default.
> One thing I'm a little confused about - I thought that GNU getopt
> (and getopt_long_only) moved arguments to the beginning of argv,
> but that doesn't seem to be the case.
This is controlled by the first character of the third argument to
`getopt' and `getopt_long_only': if that first character is `-' or `+',
`getopt' behaves differently as to the ordering of the options. See the
comments in getopt.c about the "enum ordering" type.
More information about the Gdb-patches
mailing list