can't handle command-line argument containing whitespace

Peng Yu
Mon Jan 21 13:16:00 GMT 2019

> Try this GDB command:
> (gdb) set startup-with-shell on

But it doesn't work with the -batch option. It hangs there forever.
How to fix it? Thanks.

$ gdb -batch -ex 'set startup-with-shell on' -ex run --args ./main.exe 'a b c'
[New Thread 0x1803 of process 56945]


More information about the Gdb mailing list