This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] add -s option to make -break-insert support dprintf


On Sat, Apr 20, 2013 at 3:56 AM, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "Hui" == Hui Zhu <teawater@gmail.com> writes:
>
> Hui> The MI handle the argument is different with CLI.  For example:
> Hui> Input -break-insert -s "1\n" to mi.  The mi_cmd_break_insert will get:
> [...]
>
> This seems to mean that extra quoting is needed for the format string.
> Like you can't send just:
>
> -break-insert -s "\"1\n\""
>
> It seems like you have to send:
>
> -break-insert -s "\"1\\n\""
>
>
> But an alternative is to keep the MI interface simple and "MI-like" --
> meaning using the quoting and argument parsing convention already
> defined by MI, one of its big benefits over the CLI -- and let gdb
> handle the requirements of the protocol and/or its own internals.  That
> is, send:
>
> -break-insert -s "1\n"
>
> ... and gdb can rewrite that format string to whatever is needed.
>
> Tom


Does GDB have some function can convert string to "" inside string?

Could you give me some comments about the new format for -s.

My thought is:
-s format argv1 argv2, other options

"-break-insert -s FORMAT LOCATION ARG ARG ARG ..." is too different
with current options of  -break-insert and very hard to support.

Thanks,
Hui


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]