This is the mail archive of the gdb-patches@sources.redhat.com 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]

[regcache] raw vs. cooked...


Andrew, 

I suspect the test below is not valid for pseudo-registers, since they
may not have a location in the reg cache at all.  Anyway, the change
makes sh4 work again.

Michael
Index: regcache.c
===================================================================
RCS file: /cvs/src/src/gdb/regcache.c,v
retrieving revision 1.82
diff -p -r1.82 regcache.c
*** regcache.c	17 May 2003 05:59:58 -0000	1.82
--- regcache.c	7 Jun 2003 00:55:07 -0000
*************** init_regcache_descr (struct gdbarch *gdb
*** 235,241 ****
    /* Sanity check.  Confirm that there is agreement between the
       regcache and the target's redundant REGISTER_BYTE (new targets
       should not even be defining it).  */
!   for (i = 0; i < descr->nr_cooked_registers; i++)
      {
        if (REGISTER_BYTE_P ())
  	gdb_assert (descr->register_offset[i] == REGISTER_BYTE (i));
--- 235,241 ----
    /* Sanity check.  Confirm that there is agreement between the
       regcache and the target's redundant REGISTER_BYTE (new targets
       should not even be defining it).  */
!   for (i = 0; i < descr->nr_raw_registers; i++)
      {
        if (REGISTER_BYTE_P ())
  	gdb_assert (descr->register_offset[i] == REGISTER_BYTE (i));

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