* [regcache] raw vs. cooked...
@ 2003-06-07 0:57 Michael Snyder
2003-06-08 19:06 ` Andrew Cagney
0 siblings, 1 reply; 4+ messages in thread
From: Michael Snyder @ 2003-06-07 0:57 UTC (permalink / raw)
To: cagney, gdb-patches
[-- Attachment #1: Type: text/plain, Size: 180 bytes --]
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
[-- Attachment #2: regcache.diff --]
[-- Type: text/plain, Size: 1027 bytes --]
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));
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [regcache] raw vs. cooked...
2003-06-07 0:57 [regcache] raw vs. cooked Michael Snyder
@ 2003-06-08 19:06 ` Andrew Cagney
2003-06-08 19:50 ` Kris Warkentin
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Cagney @ 2003-06-08 19:06 UTC (permalink / raw)
To: Michael Snyder, Kris Warkentin, Elena Zannoni; +Cc: gdb-patches
> 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.
The check's valid. See the thread: assertion failure in regcache.c
http://sources.redhat.com/ml/gdb/2003-05/msg00289.html
Kris, Elena, did a fix get committed?
Andrew
> 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));
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [regcache] raw vs. cooked...
2003-06-08 19:06 ` Andrew Cagney
@ 2003-06-08 19:50 ` Kris Warkentin
2003-06-08 22:22 ` Andrew Cagney
0 siblings, 1 reply; 4+ messages in thread
From: Kris Warkentin @ 2003-06-08 19:50 UTC (permalink / raw)
To: Andrew Cagney, Michael Snyder, Elena Zannoni; +Cc: gdb-patches
> > 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.
>
> The check's valid. See the thread: assertion failure in regcache.c
> http://sources.redhat.com/ml/gdb/2003-05/msg00289.html
>
> Kris, Elena, did a fix get committed?
I assume you're talking about the fix I described in this message:
http://sources.redhat.com/ml/gdb/2003-05/msg00322.html
It seems like this wouldn't work for SH64 though so I was waiting until I
had some more time to chase it. (or some SH experts piped up). It certainly
seems to fix the problem for 32 bit SH though. Perhaps we could do the fix
for all but the 64 bit version and then let someone using SH64 trip on the
assertion and have to fix it?
;-)
Kris
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [regcache] raw vs. cooked...
2003-06-08 19:50 ` Kris Warkentin
@ 2003-06-08 22:22 ` Andrew Cagney
0 siblings, 0 replies; 4+ messages in thread
From: Andrew Cagney @ 2003-06-08 22:22 UTC (permalink / raw)
To: Kris Warkentin; +Cc: Michael Snyder, Elena Zannoni, gdb-patches
>> > 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.
>
>>
>> The check's valid. See the thread: assertion failure in regcache.c
>> http://sources.redhat.com/ml/gdb/2003-05/msg00289.html
>>
>> Kris, Elena, did a fix get committed?
>
>
> I assume you're talking about the fix I described in this message:
> http://sources.redhat.com/ml/gdb/2003-05/msg00322.html
>
> It seems like this wouldn't work for SH64 though so I was waiting until I
> had some more time to chase it. (or some SH experts piped up). It certainly
> seems to fix the problem for 32 bit SH though. Perhaps we could do the fix
> for all but the 64 bit version and then let someone using SH64 trip on the
> assertion and have to fix it?
To be honest, I suspect splitting sh-tdep along the lines of i386-tdep
and x86-64-tdep might be the way to go. Anway, yes, good suggestion,
Elena?
Andrew
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-06-08 22:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-07 0:57 [regcache] raw vs. cooked Michael Snyder
2003-06-08 19:06 ` Andrew Cagney
2003-06-08 19:50 ` Kris Warkentin
2003-06-08 22:22 ` Andrew Cagney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox