From: Eli Zaretskii <eliz@gnu.org>
To: Peng Yu <pengyu.ut@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: can't handle command-line argument containing whitespace
Date: Mon, 21 Jan 2019 15:49:00 -0000 [thread overview]
Message-ID: <83sgxm9fll.fsf@gnu.org> (raw)
In-Reply-To: <CABrM6wmCJJdGP4WR9kL-doPZRsR1a5jWyVgzMbFaO39sVK7Ncw@mail.gmail.com> (message from Peng Yu on Mon, 21 Jan 2019 07:16:41 -0600)
> From: Peng Yu <pengyu.ut@gmail.com>
> Date: Mon, 21 Jan 2019 07:16:41 -0600
> Cc: "gdb@sourceware.org" <gdb@sourceware.org>
>
> > 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.)
prev parent reply other threads:[~2019-01-21 15:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-21 4:50 Peng Yu
2019-01-21 10:19 ` Eli Zaretskii
2019-01-21 13:16 ` Peng Yu
2019-01-21 15:49 ` Eli Zaretskii [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83sgxm9fll.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=gdb@sourceware.org \
--cc=pengyu.ut@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox