* [patch,rfc,6] Revert to legacy when REGISTER_BYTE
@ 2003-06-29 20:43 Andrew Cagney
2003-06-29 21:01 ` Daniel Jacobowitz
2003-07-03 14:52 ` Andrew Cagney
0 siblings, 2 replies; 4+ messages in thread
From: Andrew Cagney @ 2003-06-29 20:43 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 468 bytes --]
Sigh,
This patch changes the regcache so that, when REGISTER_BYTE or
REGISTER_RAW_SIZE are present, the old style legacy regcache layout is used.
This will stop those regcache assertion failures. Fixing the problem
(especially for MIPS) will just get too messy for the branch :-(
My thought is to commit this to 6.0 branch, while on the mainline delete
REGISTER_BYTE and REGISTER_RAW_SIZE and just wear the consequences ...
comments and/or suggestions?
Andrew
[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 3198 bytes --]
2003-06-29 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (REGISTER_RAW_SIZE, REGISTER_VIRTUAL_SIZE): Add
predicate.
* gdbarch.h, gdbarch.c: Re-generate.
* regcache.c (init_regcache_descr): Use legacy code when either
REGISTER_BYTE or REGISTER_RAW_SIZE is set.
Index: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.253
diff -u -r1.253 gdbarch.sh
--- gdbarch.sh 26 Jun 2003 17:18:42 -0000 1.253
+++ gdbarch.sh 29 Jun 2003 20:27:51 -0000
@@ -486,12 +486,12 @@
# sizes agree with the value computed from REGISTER_TYPE,
# DEPRECATED_REGISTER_RAW_SIZE can be deleted. See: maint print
# registers.
-f:2:REGISTER_RAW_SIZE:int:deprecated_register_raw_size:int reg_nr:reg_nr::generic_register_size:generic_register_size::0
+F:2:REGISTER_RAW_SIZE:int:deprecated_register_raw_size:int reg_nr:reg_nr::generic_register_size:generic_register_size
# If all registers have identical raw and virtual sizes and those
# sizes agree with the value computed from REGISTER_TYPE,
# DEPRECATED_REGISTER_VIRTUAL_SIZE can be deleted. See: maint print
# registers.
-f:2:REGISTER_VIRTUAL_SIZE:int:deprecated_register_virtual_size:int reg_nr:reg_nr::generic_register_size:generic_register_size::0
+F:2:REGISTER_VIRTUAL_SIZE:int:deprecated_register_virtual_size:int reg_nr:reg_nr::generic_register_size:generic_register_size
# DEPRECATED_MAX_REGISTER_RAW_SIZE can be deleted. It has been
# replaced by the constant MAX_REGISTER_SIZE.
V:2:DEPRECATED_MAX_REGISTER_RAW_SIZE:int:deprecated_max_register_raw_size
Index: regcache.c
===================================================================
RCS file: /cvs/src/src/gdb/regcache.c,v
retrieving revision 1.88
diff -u -r1.88 regcache.c
--- regcache.c 16 Jun 2003 13:19:36 -0000 1.88
+++ regcache.c 29 Jun 2003 20:28:07 -0000
@@ -178,16 +178,17 @@
/* If an old style architecture, fill in the remainder of the
register cache descriptor using the register macros. */
- if (!gdbarch_pseudo_register_read_p (gdbarch)
- && !gdbarch_pseudo_register_write_p (gdbarch)
- && !gdbarch_register_type_p (gdbarch))
+ /* NOTE: cagney/2003-06-29: If either of REGISTER_BYTE or
+ REGISTER_RAW_SIZE are still present, things are most likely
+ totally screwed. Ex: an architecture with raw register sizes
+ smaller than what REGISTER_BYTE indicates; non monotonic
+ REGISTER_BYTE values. For GDB 6 check for these nasty methods
+ and fall back to legacy code when present. Sigh! */
+ if ((!gdbarch_pseudo_register_read_p (gdbarch)
+ && !gdbarch_pseudo_register_write_p (gdbarch)
+ && !gdbarch_register_type_p (gdbarch))
+ || REGISTER_BYTE_P () || REGISTER_RAW_SIZE_P ())
{
- /* NOTE: cagney/2003-05-02: Don't add a test for REGISTER_BYTE_P
- to the above. Doing that would cause all the existing
- architectures to revert back to the legacy regcache
- mechanisms, and that is not a good thing. Instead just,
- later, check that the register cache's layout is consistent
- with REGISTER_BYTE. */
descr->legacy_p = 1;
init_legacy_regcache_descr (gdbarch, descr);
return descr;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch,rfc,6] Revert to legacy when REGISTER_BYTE
2003-06-29 20:43 [patch,rfc,6] Revert to legacy when REGISTER_BYTE Andrew Cagney
@ 2003-06-29 21:01 ` Daniel Jacobowitz
2003-07-01 21:39 ` Andrew Cagney
2003-07-03 14:52 ` Andrew Cagney
1 sibling, 1 reply; 4+ messages in thread
From: Daniel Jacobowitz @ 2003-06-29 21:01 UTC (permalink / raw)
To: gdb-patches
On Sun, Jun 29, 2003 at 04:43:40PM -0400, Andrew Cagney wrote:
> Sigh,
>
> This patch changes the regcache so that, when REGISTER_BYTE or
> REGISTER_RAW_SIZE are present, the old style legacy regcache layout is used.
>
> This will stop those regcache assertion failures. Fixing the problem
> (especially for MIPS) will just get too messy for the branch :-(
>
> My thought is to commit this to 6.0 branch, while on the mainline delete
> REGISTER_BYTE and REGISTER_RAW_SIZE and just wear the consequences ...
>
> comments and/or suggestions?
> Andrew
Makes sense to me. You've been making steady progress on this problem,
and it looks like it's just finally time to kill REGISTER_BYTE.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch,rfc,6] Revert to legacy when REGISTER_BYTE
2003-06-29 21:01 ` Daniel Jacobowitz
@ 2003-07-01 21:39 ` Andrew Cagney
0 siblings, 0 replies; 4+ messages in thread
From: Andrew Cagney @ 2003-07-01 21:39 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb-patches
> On Sun, Jun 29, 2003 at 04:43:40PM -0400, Andrew Cagney wrote:
>
>> Sigh,
>>
>> This patch changes the regcache so that, when REGISTER_BYTE or
>> REGISTER_RAW_SIZE are present, the old style legacy regcache layout is used.
>>
>> This will stop those regcache assertion failures. Fixing the problem
>> (especially for MIPS) will just get too messy for the branch :-(
>>
>> My thought is to commit this to 6.0 branch, while on the mainline delete
>> REGISTER_BYTE and REGISTER_RAW_SIZE and just wear the consequences ...
>>
>> comments and/or suggestions?
>> Andrew
>
>
> Makes sense to me. You've been making steady progress on this problem,
> and it looks like it's just finally time to kill REGISTER_BYTE.
If I delete them, I think the MIPS nat code will break. There is an
assumption that, at least on IRIX, when a 32 bit ABI on a 64 bit ISA,
all the registers are 32 bit left aligned within the 64 bit field (I
think they should be sign extended).
:-(
Andrew
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch,rfc,6] Revert to legacy when REGISTER_BYTE
2003-06-29 20:43 [patch,rfc,6] Revert to legacy when REGISTER_BYTE Andrew Cagney
2003-06-29 21:01 ` Daniel Jacobowitz
@ 2003-07-03 14:52 ` Andrew Cagney
1 sibling, 0 replies; 4+ messages in thread
From: Andrew Cagney @ 2003-07-03 14:52 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb-patches
> Sigh,
>
> This patch changes the regcache so that, when REGISTER_BYTE or REGISTER_RAW_SIZE are present, the old style legacy regcache layout is used.
>
> This will stop those regcache assertion failures. Fixing the problem (especially for MIPS) will just get too messy for the branch :-(
>
> My thought is to commit this to 6.0 branch, while on the mainline delete REGISTER_BYTE and REGISTER_RAW_SIZE and just wear the consequences ...
>
> comments and/or suggestions?
(none against)
> 2003-06-29 Andrew Cagney <cagney@redhat.com>
>
> * gdbarch.sh (REGISTER_RAW_SIZE, REGISTER_VIRTUAL_SIZE): Add
> predicate.
> * gdbarch.h, gdbarch.c: Re-generate.
> * regcache.c (init_regcache_descr): Use legacy code when either
> REGISTER_BYTE or REGISTER_RAW_SIZE is set.
I've checked this in to the 6.0 branch (and for the sake of consistency,
the trunk).
Andrew
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-07-03 14:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-29 20:43 [patch,rfc,6] Revert to legacy when REGISTER_BYTE Andrew Cagney
2003-06-29 21:01 ` Daniel Jacobowitz
2003-07-01 21:39 ` Andrew Cagney
2003-07-03 14:52 ` Andrew Cagney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox