This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix dprintf work not right if it is pending
- From: Pedro Alves <palves at redhat dot com>
- To: Hui Zhu <teawater at gmail dot com>
- Cc: Keith Seitz <keiths at redhat dot com>, Hui Zhu <hui_zhu at mentor dot com>, gdb-patches ml <gdb-patches at sourceware dot org>
- Date: Mon, 08 Apr 2013 15:39:37 +0100
- Subject: Re: [PATCH] Fix dprintf work not right if it is pending
- References: <514BF736 dot 3070706 at mentor dot com> <514C3C85 dot 4000704 at codesourcery dot com> <514EEBFF dot 8090705 at redhat dot com> <CANFwon3D77yDiB_bQ0iZeg=KpkwoGiKnu=_7+kfcVV547M_cfg at mail dot gmail dot com> <5154378D dot 60302 at redhat dot com> <CANFwon3OdcsC3PQRwteYPKiBYFFKGPcOfMVcc4Fx8XdjZ=-pQw at mail dot gmail dot com> <515B1DF7 dot 3090705 at redhat dot com> <515EF6A3 dot 2080704 at redhat dot com> <CANFwon2UZwnHqCuEtSbSz6z82tr2HciU0QfiQS2dacFdFcvMFg at mail dot gmail dot com> <CANFwon11DSoU5jiHX4G7RGuxBOZRaXD6Cth6Ob3X_Z0-TgnPXw at mail dot gmail dot com>
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