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

Tom Tromey tromey@redhat.com
Thu Apr 25 06:51:00 GMT 2013


>>>>> "Hui" == Hui Zhu <teawater@gmail.com> writes:

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

I wouldn't rule it out but I couldn't think of one offhand.

Hui> Could you give me some comments about the new format for -s.
Hui> My thought is:
Hui> -s format argv1 argv2, other options
Hui> "-break-insert -s FORMAT LOCATION ARG ARG ARG ..." is too different
Hui> with current options of  -break-insert and very hard to support.

What is hard about it?

In mi_cmd_break_insert, if '-s' was given, use argv[oind+1] through
argv[argc-1] as the arguments.  Maybe the hard part is getting this
through create_breakpoint?  That is just further proof that it is a bad
API.

TBH I don't see why this needs to be in -break-insert.  A new command
seems cleaner to me.  But I don't want to press too hard either.

Tom



More information about the Gdb-patches mailing list