Re: can't handle command-line argument containing whitespace

Eli Zaretskii <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
> From: Peng Yu <[email protected]>
> Date: Mon, 21 Jan 2019 07:16:41 -0600
> Cc: "[email protected]" <[email protected]>
> 
> > 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.

Don't run your program from the command line, run it from a script
file that you load via the -x command-line switch.  In that script,
put the "set startup-with-shell on" command first, then your "run"
command with the arguments for the program you want to debug.

(Why do you run GDB with -batch, btw?  GDB is an interactive debugger,
so you should have a way of interacting with it.)
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.