public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* PATCH: Set MAX_REGISTER_SIZE to 64
@ 2010-09-13 17:58 H.J. Lu
  2010-09-30 19:14 ` Joel Brobecker
  0 siblings, 1 reply; 3+ messages in thread
From: H.J. Lu @ 2010-09-13 17:58 UTC (permalink / raw)
  To: GDB

Hi,

I am working on 512bit vector support in gdb.  When I ran gdb with the
new gdbserver, I got

../../gdb/regcache.c:135: internal-error: init_regcache_descr: Assertion `MAX_REGISTER_SIZE >= descr->sizeof_register[i]' failed.

So the new gdbserver isn't compatible with the existing gdb.  This patch
avoids crash with 512bit register.  OK for trunk/7.2/7.1?

Thanks.


H.J.
---
2010-09-13  H.J. Lu  <hongjiu.lu@intel.com>

	* defs.h (MAX_REGISTER_SIZE): Set to 64.

diff --git a/gdb/defs.h b/gdb/defs.h
index a10652a..9e4800c 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -1037,7 +1037,7 @@ extern void *alloca ();
 /* Maximum size of a register.  Something small, but large enough for
    all known ISAs.  If it turns out to be too small, make it bigger.  */
 
-enum { MAX_REGISTER_SIZE = 32 };
+enum { MAX_REGISTER_SIZE = 64 };
 
 /* Static target-system-dependent parameters for GDB. */
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PATCH: Set MAX_REGISTER_SIZE to 64
  2010-09-13 17:58 PATCH: Set MAX_REGISTER_SIZE to 64 H.J. Lu
@ 2010-09-30 19:14 ` Joel Brobecker
  2010-10-05 21:46   ` Tom Tromey
  0 siblings, 1 reply; 3+ messages in thread
From: Joel Brobecker @ 2010-09-30 19:14 UTC (permalink / raw)
  To: H.J. Lu; +Cc: GDB

> 2010-09-13  H.J. Lu  <hongjiu.lu@intel.com>
> 
> 	* defs.h (MAX_REGISTER_SIZE): Set to 64.

I wonder if we are going to have to make this gdbarch specific,
one of these days. It's probably peanuts, but it's annoying to be
allocating 64byte buffers to store/fetch registers when the max
size on that platform is 8 or 16 bytes.

In the meantime, seems OK to me (for HEAD). I'm OK with putting
this in 7.2, but I'd like the OK from another maintainer before
you put it in 7.2, just to be on the safe side [1].

-- 
Joel

[1]: It's still unclear whether there will be another release off
     the 7.2 branch. I think something to be re-evaluated later,
     around Oct/Nov. Perhaps we can informally talk about it at
     the GCC Summit?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PATCH: Set MAX_REGISTER_SIZE to 64
  2010-09-30 19:14 ` Joel Brobecker
@ 2010-10-05 21:46   ` Tom Tromey
  0 siblings, 0 replies; 3+ messages in thread
From: Tom Tromey @ 2010-10-05 21:46 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: H.J. Lu, GDB

>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:

>> * defs.h (MAX_REGISTER_SIZE): Set to 64.

Joel> In the meantime, seems OK to me (for HEAD). I'm OK with putting
Joel> this in 7.2, but I'd like the OK from another maintainer before
Joel> you put it in 7.2, just to be on the safe side [1].

I think that would be fine.

From a little looking around there don't seem to be many bad effects
from bumping this.  Mostly it seems to be used to size arrays on the
stack.

Joel> [1]: It's still unclear whether there will be another release off
Joel>      the 7.2 branch. I think something to be re-evaluated later,
Joel>      around Oct/Nov. Perhaps we can informally talk about it at
Joel>      the GCC Summit?

Sounds good to me.  I think we should have a BOF or something, but I
haven't yet looked into setting it up.

Tom

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-10-05 21:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-13 17:58 PATCH: Set MAX_REGISTER_SIZE to 64 H.J. Lu
2010-09-30 19:14 ` Joel Brobecker
2010-10-05 21:46   ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).