can't handle command-line argument containing whitespace

Peng Yu <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <CABrM6wmBb3CfAAjw4adQV7ebATb+ybZK0TUOp0rHQPnP1C+p2g@mail.gmail.com>
Hi,

I got the following error. Is there a way to allow gdb accept
arguments with whitespaces? Thanks

$ ./main.exe 'a b c'
a b c
$ cat main.c
/* vim: set noexpandtab tabstop=2: */
#include <stdio.h>

int main(int argc, char *argv[]) {
    puts(argv[1]);
    return 0;
}
$ gdb -q --args main.exe  'a b c'
Reading symbols from main.exe...(no debugging symbols found)...done.
(gdb) r
Starting program: /root/linux/test/gnu/gdb/bin/--args/main.exe can't
handle command-line argument containing whitespace
(gdb)

-- 
Regards,
Peng
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.