[PATCH] Fix dprintf work not right if it is pending
Pedro Alves
palves@redhat.com
Mon Apr 8 18:34:00 GMT 2013
Hi Hui,
Getting there.
On 04/08/2013 08:19 AM, Hui Zhu wrote:
> + /* 1 - connect to target 1, that can run breakpoint commands.
> + 2 - create a dprintf, which resolves fine.
> + 3 - disconnect from target 2
This should have been "from target 1".
> + 4 - connect to target 2, that can NOT run breakpoint commands.
> +load_lib gdbserver-support.exp
> +
You're not calling gdbserver directly anymore, so this is no
longer necessary.
> +set testfile "dprintf-pending"
> +set libfile "dprintf-pendshr"
> +set srcfile $testfile.c
> +set libsrc $srcdir/$subdir/$libfile.c
> +set binfile $objdir/$subdir/$testfile
> +set lib_sl $objdir/$subdir/$libfile.sl
Please use standard_testfile/standard_output_file.
Instead of these explicit "(without ...)":
> + "set pending dprintf (without format)" \
...
> + "set pending dprintf (without symbols)" \
...
> +"single pending dprintf info (without symbols)"
...
> +gdb_test "" ".*x=3.*x=4.*x=3.*" "run to resolved dprintf (without symbols)"
Please use with_test_prefix, like
with_test_prefix "without format" {
... group all "without format" bits here, including test setup ...
}
with_test_prefix "without symbols" {
... group all "without symbols" bits here ...
}
> +gdb_test "file ${binfile}" ".*Error in re-setting breakpoint.*" "load symbols get without format error"
"load symbols get without format error" is not very correct English
and I find it hard to grok. I suggest instead "resolved dprintf fails to
be re-set". No need to mention "without format" here, as that will be
covered by with_test_prefix.
--
Pedro Alves
More information about the Gdb-patches
mailing list