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
On Thu, Jan 25, 2001 at 09:17:31AM -0500, Fernando Nasser wrote:
>"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 :-).
IMO, this is unquestionably the right way to deal with this.
cgf