* Problem setting a breakpoint at a location containing spaces (using MI)
@ 2009-02-12 19:02 Francois Chouinard
2009-02-12 19:09 ` Robert Dewar
2009-02-12 22:43 ` Tom Tromey
0 siblings, 2 replies; 6+ messages in thread
From: Francois Chouinard @ 2009-02-12 19:02 UTC (permalink / raw)
To: gdb
Hi,
I know this sounds supremely basic but, using MI, what would be the
syntax to insert a breakpoint when specifying a location containing
spaces?
E.g. (w/ gdb 6.8):
(gdb)
-break-insert "../src/DSF Hello World.c:16"
&"Function \"\" not defined.\n"
^error,msg="Function \"\" not defined."
(gdb)
-break-insert "../src/DSF\ Hello\ World.c:16"
&"Function \"\" not defined.\n"
^error,msg="Function \"\" not defined."
(gdb)
-break-insert "../src/DSF\\ Hello\\ World.c:16"
&"Function \"\" not defined.\n"
^error,msg="Function \"\" not defined."
(gdb)
It tried a few other variants (involving creative use of double quotes
and backslashes :-) but they didn't work either...
Is there a protocol limitation? I know it works well with CLI but I
wonder what is the correct variant to make it work with MI.
Also, wasn't it working in the past?
Thanks,
/fc
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Problem setting a breakpoint at a location containing spaces (using MI)
2009-02-12 19:02 Problem setting a breakpoint at a location containing spaces (using MI) Francois Chouinard
@ 2009-02-12 19:09 ` Robert Dewar
[not found] ` <578d90ee0902121323s30299358y326cb7776ec7f3be@mail.gmail.com>
2009-02-12 22:43 ` Tom Tromey
1 sibling, 1 reply; 6+ messages in thread
From: Robert Dewar @ 2009-02-12 19:09 UTC (permalink / raw)
To: Francois Chouinard; +Cc: gdb
Francois Chouinard wrote:
> Hi,
>
> I know this sounds supremely basic but, using MI, what would be the
> syntax to insert a breakpoint when specifying a location containing
> spaces?
It always surprises me that people would cause themselves grief
by putting spaces into source file names (or the directories
where they live). This is asking for trouble with tools.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Problem setting a breakpoint at a location containing spaces (using MI)
[not found] ` <578d90ee0902121323s30299358y326cb7776ec7f3be@mail.gmail.com>
@ 2009-02-12 21:33 ` Francois Chouinard
2009-02-12 21:49 ` Francois Chouinard
0 siblings, 1 reply; 6+ messages in thread
From: Francois Chouinard @ 2009-02-12 21:33 UTC (permalink / raw)
To: gdb
So, short of wrapping the corresponding CLI command, is there a way to
stick to MI and set such a breakpoint?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Problem setting a breakpoint at a location containing spaces (using MI)
2009-02-12 21:33 ` Francois Chouinard
@ 2009-02-12 21:49 ` Francois Chouinard
0 siblings, 0 replies; 6+ messages in thread
From: Francois Chouinard @ 2009-02-12 21:49 UTC (permalink / raw)
To: gdb
On Thu, Feb 12, 2009 at 4:33 PM, Francois Chouinard
<fchouinard@gmail.com> wrote:
> So, short of wrapping the corresponding CLI command, is there a way to
> stick to MI and set such a breakpoint?
>
I guess I wasn't too clear.
I am working on the DSF-GDB integration of the Eclipse CDT and our
preferred way to interact with gdb is through MI.
Unfortunately, odds are that, out there, a user will try to set such a
breakpoint (with space in directory/source file name).
Is there a way to achieve this with MI? If so, I would appreciate if
someone could indicate how. If not, then it's just a protocol
limitation and I will try to provide a useful message (or wrap the CLI
command).
Thanks,
/fc
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Problem setting a breakpoint at a location containing spaces (using MI)
2009-02-12 19:02 Problem setting a breakpoint at a location containing spaces (using MI) Francois Chouinard
2009-02-12 19:09 ` Robert Dewar
@ 2009-02-12 22:43 ` Tom Tromey
2009-02-12 22:50 ` Francois Chouinard
1 sibling, 1 reply; 6+ messages in thread
From: Tom Tromey @ 2009-02-12 22:43 UTC (permalink / raw)
To: Francois Chouinard; +Cc: gdb
>>>>> "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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Problem setting a breakpoint at a location containing spaces (using MI)
2009-02-12 22:43 ` Tom Tromey
@ 2009-02-12 22:50 ` Francois Chouinard
0 siblings, 0 replies; 6+ messages in thread
From: Francois Chouinard @ 2009-02-12 22:50 UTC (permalink / raw)
To: tromey, gdb
Thanks a lot!
On Thu, Feb 12, 2009 at 5:42 PM, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "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
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-02-12 22:50 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-12 19:02 Problem setting a breakpoint at a location containing spaces (using MI) Francois Chouinard
2009-02-12 19:09 ` Robert Dewar
[not found] ` <578d90ee0902121323s30299358y326cb7776ec7f3be@mail.gmail.com>
2009-02-12 21:33 ` Francois Chouinard
2009-02-12 21:49 ` Francois Chouinard
2009-02-12 22:43 ` Tom Tromey
2009-02-12 22:50 ` Francois Chouinard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox