This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: RFC: Fix to double parsing of filenames in GDB command line
- To: "Frank Ch. Eigler" <fche at redhat dot com>
- Subject: Re: RFC: Fix to double parsing of filenames in GDB command line
- From: Fernando Nasser <fnasser at redhat dot com>
- Date: Thu, 25 Jan 2001 09:17:31 -0500
- CC: gdb-patches at sources dot redhat dot com, cgf at cygnus dot com
- Organization: Red Hat Canada
- References: <3A6FA46E.1955116E@redhat.com> <o5snm76cyu.fsf@touchme.toronto.redhat.com>
"Frank Ch. Eigler" wrote:
>
> Fernando Nasser <fnasser@redhat.com> writes:
>
> : For those who asked, this is the CLI fix to the double parsing of
> : filenames when supplied as command line arguments to gdb. [...]
>
> Wow, that's a big patch. Did you consider a simpler approach, where
> main.c's getopt parsing loop escapes each string that's intended to be
> used as a file / directory name? It could replace cdarg, dirarg[],
> execarg, symarg with double-size versions that backslash-escape every
> character, in anticipation of the existing catch_command_errors()
> parsing.
>
That would be a hack. I would be escaping the escaping characters just
to
remove them again in a code that should not be in there.
The real problem was that gdb core code was using CLI code intended
to handle commands typed by the user. The CLI can call libgdb code,
not otherwise.
FYI, we are trying to extricate the CLI from libgdb so it can be used as
such.
It is a long process by we are getting an inch closer every week :-).
--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9