This is the mail archive of the gdb@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]

Re: assertion failure in regcache.c


Looks like you're right.  If I update to 2003-05-04 it's fine, but after
that it blows up.  Seems to only be a problem for sh4 though.  Any
suggestions as to what might be breaking this?  Here's the output of maint
print registers.

cheers,

Kris

Breakpoint 1, main () at float.c:22
22              a=324.235;
(gdb) maint print registers
 Name         Nr  Rel Offset    Size  Type
 r0            0    0      0       4  int
 r1            1    1      4       4  int
 r2            2    2      8       4  int
 r3            3    3     12       4  int
 r4            4    4     16       4  int
 r5            5    5     20       4  int
 r6            6    6     24       4  int
 r7            7    7     28       4  int
 r8            8    8     32       4  int
 r9            9    9     36       4  int
 r10          10   10     40       4  int
 r11          11   11     44       4  int
 r12          12   12     48       4  int
 r13          13   13     52       4  int
 r14          14   14     56       4  int
 r15          15   15     60       4  int
 pc           16   16     64       4  int
 pr           17   17     68       4  int
 gbr          18   18     72       4  int
 vbr          19   19     76       4  int
 mach         20   20     80       4  int
 macl         21   21     84       4  int
 sr           22   22     88       4  int
 fpul         23   23     92       4  float
 fpscr        24   24     96       4  int
 fr0          25   25    100       4  float
 fr1          26   26    104       4  float
 fr2          27   27    108       4  float
 fr3          28   28    112       4  float
 fr4          29   29    116       4  float
 fr5          30   30    120       4  float
 fr6          31   31    124       4  float
 fr7          32   32    128       4  float
 fr8          33   33    132       4  float
 fr9          34   34    136       4  float
 fr10         35   35    140       4  float
 fr11         36   36    144       4  float
 fr12         37   37    148       4  float
 fr13         38   38    152       4  float
 fr14         39   39    156       4  float
 fr15         40   40    160       4  float
 ssr          41   41    164       4  int
 spc          42   42    168       4  int
 r0b0         43   43    172       4  int
 r1b0         44   44    176       4  int
 r2b0         45   45    180       4  int
 r3b0         46   46    184       4  int
 r4b0         47   47    188       4  int
 r5b0         48   48    192       4  int
 r6b0         49   49    196       4  int
 r7b0         50   50    200       4  int
 r0b1         51   51    204       4  int
 r1b1         52   52    208       4  int
 r2b1         53   53    212       4  int
 r3b1         54   54    216       4  int
 r4b1         55   55    220       4  int
 r5b1         56   56    224       4  int
 r6b1         57   57    228       4  int
 r7b1         58   58    232       4  int
 dr0          59    0    236*1     8  double
 dr2          60    1    244*1     8  double
 dr4          61    2    252*1     8  double
 dr6          62    3    260*1     8  double
 dr8          63    4    268*1     8  double
 dr10         64    5    276*1     8  double
 dr12         65    6    284*1     8  double
 dr14         66    7    292*1     8  double
 fv0          67    8    300*1    16  *2
 fv4          68    9    316*1    16  *2
 fv8          69   10    332*1    16  *2
 fv12         70   11    348*1    16  *2
*1: Inconsistent register offsets.
*2: Register type's name NULL.
(gdb)

> > I just did an update and now I'm getting an assertion failure with my
sh4
> > port.
> >
> > gdb/regcache.c:241: internal-error: init_regcache_descr: Assertion
> > `descr->register_offset[i] == REGISTER_BYTE (i)' failed.
> >
> > My code worked in the past few weeks so it looks like this is something
> > recent.  The only change I can see to regcache.c and sh-tdep.c is to use
> > DEPRECATED_REGISTER_BYTES.  Can anyone give any suggestions as to what
might
> > be going wrong?
>
> Can you go back to the ``working'' code and check the output from:
>
> (gdb) maint print registers
>
> (look for footnotes).  I added a sanity check with:
>
> 2003-05-04  Andrew Cagney  <cagney@redhat.com>
>
>          * sentinel-frame.c (sentinel_frame_prev_register): Replace
>          REGISTER_BYTE with register_offset_hack.
>          * regcache.c (init_regcache_descr): When REGISTER_BYTE_P, check
>          that REGISTER_BYTE is consistent with the regcache.
>          * gdbarch.sh (REGISTER_BYTE): Add a predicate.
>          * gdbarch.h, gdbarch.c: Regenerate.
>
> however, I suspect that there has been long standing disagreement over
> the offsets only nothing was noticing it :-/
>
> Andrew
>
>
>


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