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 06/15] regcache::cooked_write test


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


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