This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 06/15] regcache::cooked_write test
- From: Simon Marchi <simon dot marchi at ericsson dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>, <gdb-patches at sourceware dot org>
- Date: Thu, 18 Jan 2018 11:12:44 -0500
- Subject: Re: [PATCH 06/15] regcache::cooked_write test
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=simon dot marchi at ericsson dot com;
- References: <1512125286-29788-1-git-send-email-yao.qi@linaro.org> <1512125286-29788-7-git-send-email-yao.qi@linaro.org>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On 2017-12-01 05:47 AM, Yao Qi wrote:
> Since my following patches will change how each gdbarch read and write
> pseudo registers, it's better to write a unit test to
> regcache::cooked_write, to make sure my following changes don't cause
> any regressions. See the comments on cooked_write_test.
Hi Yao,
I looked at patches up to this one (the preparatory patches), and they look
good to me. However, I wasn't able to properly apply patch 3 "Remove mt port",
probably a git/email issue.
I think you can start pushing them when you feel like it, it will ligthen the
patch series a little bit, and they are good patches on their own.
I noted one nit below:
> gdb:
>
> 2017-11-27 Yao Qi <yao.qi@linaro.org>
>
> * regcache.c (cooked_write_test): New function.
> (_initialize_regcache): Register the test.
> ---
> gdb/regcache.c | 124 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 124 insertions(+)
>
> diff --git a/gdb/regcache.c b/gdb/regcache.c
> index a7a4683..4577913 100644
> --- a/gdb/regcache.c
> +++ b/gdb/regcache.c
> @@ -1609,6 +1609,7 @@ maintenance_print_remote_registers (const char *args, int from_tty)
> #include "selftest.h"
> #include "selftest-arch.h"
> #include "gdbthread.h"
> +#include "target-float.h"
>
> namespace selftests {
>
> @@ -1926,6 +1927,127 @@ cooked_read_test (struct gdbarch *gdbarch)
> }
> }
>
> +/* Test regcache::cooked_write by writing some expected contents to
> + registers, and checking that contents red from registers and the
red -> read
Simon