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] |
On Thu, Apr 25, 2013 at 4:35 AM, Tom Tromey <tromey@redhat.com> wrote: >>>>>> "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 Hi Tom, According to your comments. I did some update with these patches to added special command -dprintf-insert to insert dprintf. Its format is close to simple dprintf command: -dprintf-insert LOCATION FORMAT ARG ARG ... Thanks, Hui 2013-05-03 Hui Zhu <hui@codesourcery.com> * breakpoint.c (dprintf_breakpoint_ops): Remove its static. * breakpoint.h (dprintf_breakpoint_ops): Add extern. * mi/mi-cmd-break.c (ctype.h): New include. (mi_argv_to_format, mi_cmd_break_insert_1): New. (mi_cmd_break_insert): Call mi_cmd_break_insert_1. (mi_cmd_dprintf_insert): New. * mi/mi-cmds.c (mi_cmds): Add "dprintf-insert". * mi/mi-cmds.h (mi_cmd_dprintf_insert): New extern. 2013-05-03 Hui Zhu <hui@codesourcery.com> * gdb.texinfo (GDB/MI Breakpoint Commands): Describe the "-dprintf-insert" command. 2013-05-03 Hui Zhu <hui@codesourcery.com> * gdb.mi/Makefile.in (PROGS): Add "mi-dprintf". * gdb.mi/mi-dprintf.exp, gdb.mi/mi-dprintf.c: New.
Attachment:
mi-dprintf.txt
Description: Text document
Attachment:
mi-dprintf-doc.txt
Description: Text document
Attachment:
mi-dprintf-test.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |