From: Eli Zaretskii <eliz@gnu.org>
To: gdb@sourceware.org,Peng Yu
<pengyu.ut@gmail.com>,"gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: can't handle command-line argument containing whitespace
Date: Mon, 21 Jan 2019 10:19:00 -0000 [thread overview]
Message-ID: <D4771524-9806-46A3-AB16-E4D67687395C@gnu.org> (raw)
In-Reply-To: <CABrM6wmBb3CfAAjw4adQV7ebATb+ybZK0TUOp0rHQPnP1C+p2g@mail.gmail.com>
On January 21, 2019 6:50:25 AM GMT+02:00, Peng Yu <pengyu.ut@gmail.com> wrote:
> 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)
Try this GDB command:
(gdb) set startup-with-shell on
next prev parent reply other threads:[~2019-01-21 10:19 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 [this message]
2019-01-21 13:16 ` Peng Yu
2019-01-21 15:49 ` Eli Zaretskii
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=D4771524-9806-46A3-AB16-E4D67687395C@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