Problem setting a breakpoint at a location containing spaces (using MI)

Tom Tromey tromey@redhat.com
Thu Feb 12 22:43:00 GMT 2009


>>>>> "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



More information about the Gdb mailing list