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 1/3] Test of breakpoint output for dprintf


>>>>> "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


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