This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Problem setting a breakpoint at a location containing spaces (using MI)
- From: Tom Tromey <tromey at redhat dot com>
- To: Francois Chouinard <fchouinard at gmail dot com>
- Cc: gdb at sourceware dot org
- Date: Thu, 12 Feb 2009 15:42:54 -0700
- Subject: Re: Problem setting a breakpoint at a location containing spaces (using MI)
- References: <578d90ee0902121102h75129e60xec5aae8a15820b08@mail.gmail.com>
- Reply-to: tromey at redhat dot com
>>>>> "Francois" == Francois Chouinard <fchouinard@gmail.com> writes:
Francois> I know this sounds supremely basic but, using MI, what would
Francois> be the syntax to insert a breakpoint when specifying a
Francois> location containing spaces?
FWIW I tried this on the CLI and used:
(gdb) b "a b.c":5
Based on this, plus reading mi-parse.c:mi_parse_argv and
mi-cmd-break.c:mi_cmd_break_insert, I tried:
-break-insert "\"a b.c\":5"
^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x080483c5",func="main",file="a b.c",fullname="/tmp/a b.c",line="5",times="0"}
So this seems to work :-)
Francois> Is there a protocol limitation? I know it works well with
Francois> CLI but I wonder what is the correct variant to make it work
Francois> with MI.
I think the oddity here is that there is MI quoting to deal with, but
also quoting handled by the location parsing code.
Tom