This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/3] Test of breakpoint output for dprintf
- From: Tom Tromey <tromey at redhat dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: <gdb-patches at sourceware dot org>
- Date: Wed, 09 Jan 2013 13:35:40 -0700
- Subject: Re: [PATCH 1/3] Test of breakpoint output for dprintf
- References: <1355285581-28889-1-git-send-email-yao@codesourcery.com> <1355285581-28889-2-git-send-email-yao@codesourcery.com>
>>>>> "Yao" == Yao Qi <yao@codesourcery.com> writes:
Yao> We don't have a test to check the output of 'info breakpoints' and fields
Yao> in "=breakpoint-created" notificiation, which are all related to
Yao> 'print_one_breakpoint_location'. This patch adds tests for dprintf.
Yao> Is it OK?
Yao> +gdb_test "info breakpoints" "3\[\t \]+dprintf .*
Yao> +\[\t \]+printf \"At foo entry\\\\n\".
Yao> +\[\t \]+continue.
Yao> +4\[\t \]+dprintf .*
Yao> +\[\t \]+printf \"arg=%d, g=%d\\\\n\", arg, g.
Yao> +\[\t \]+continue." "dprintf info 1"
I find this style of test pretty hard to read.
How about using "\n" instead of a newline?
Or writing the string some other way to make it more readable?
Or perhaps this is just a personal idiosyncracy of mine.
I don't know. If others are ok with this, I don't mind.
Otherwise the patch looks fine.
Tom