[PATCH 1/8] AARCH64 SVE: Increse max register sizes

Alan Hayward alan.hayward@arm.com
Mon Dec 5 12:26:00 GMT 2016

This is part of a series adding AARCH64 SVE support to gdb and gdbserver.

In SVE the maximum size of a variable-length vector register is 256 bytes,
times the current maximum size currently supported in gdb. This patch
the max register size and max gdbserver buffer size accordingly.

Alternatively, I could add a target variable using gdbarch.c, however
there are
80+ static arrays within the code using the value, which would all need
replacing with mallocs/frees.

Tested on x86 and aarch64.
Ok to commit as is?


diff --git a/gdb/defs.h b/gdb/defs.h
d5c7f6f 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -622,7 +622,7 @@ enum symbol_needs_kind
 /* * 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 = 64 };
+enum { MAX_REGISTER_SIZE = 256 };

 /* In findvar.c.  */

diff --git a/gdb/gdbserver/server.h b/gdb/gdbserver/server.h
aa6751d 100644
--- a/gdb/gdbserver/server.h
+++ b/gdb/gdbserver/server.h
@@ -140,7 +140,7 @@ extern int in_queued_stop_replies (ptid_t ptid);
 /* Buffer sizes for transferring memory, registers, etc.   Set to a
    value to accomodate multiple register formats.  This value must be at
    as large as the largest register set supported by gdbserver.  */
-#define PBUFSIZ 16384
+#define PBUFSIZ 19200

 /* Definition for an unknown syscall, used basically in error-cases.  */
 #define UNKNOWN_SYSCALL (-1)

More information about the Gdb-patches mailing list