aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/gdbarch.c')
-rw-r--r--gdb/gdbarch.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 2b892b6..ea48fa7 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -145,6 +145,7 @@ struct gdbarch
int int_bit;
int long_bit;
int long_long_bit;
+ int long_long_align_bit;
int half_bit;
const struct floatformat ** half_format;
int float_bit;
@@ -299,6 +300,7 @@ struct gdbarch startup_gdbarch =
8 * sizeof (int), /* int_bit */
8 * sizeof (long), /* long_bit */
8 * sizeof (LONGEST), /* long_long_bit */
+ 8 * sizeof (LONGEST), /* long_long_align_bit */
16, /* half_bit */
0, /* half_format */
8 * sizeof (float), /* float_bit */
@@ -463,6 +465,7 @@ gdbarch_alloc (const struct gdbarch_info *info,
gdbarch->int_bit = 4*TARGET_CHAR_BIT;
gdbarch->long_bit = 4*TARGET_CHAR_BIT;
gdbarch->long_long_bit = 2*gdbarch->long_bit;
+ gdbarch->long_long_align_bit = 2*gdbarch->long_bit;
gdbarch->half_bit = 2*TARGET_CHAR_BIT;
gdbarch->float_bit = 4*TARGET_CHAR_BIT;
gdbarch->double_bit = 8*TARGET_CHAR_BIT;
@@ -576,6 +579,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of int_bit, invalid_p == 0 */
/* Skip verify of long_bit, invalid_p == 0 */
/* Skip verify of long_long_bit, invalid_p == 0 */
+ /* Skip verify of long_long_align_bit, invalid_p == 0 */
/* Skip verify of half_bit, invalid_p == 0 */
if (gdbarch->half_format == 0)
gdbarch->half_format = floatformats_ieee_half;
@@ -1020,6 +1024,9 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
"gdbarch_dump: long_double_format = %s\n",
pformat (gdbarch->long_double_format));
fprintf_unfiltered (file,
+ "gdbarch_dump: long_long_align_bit = %s\n",
+ plongest (gdbarch->long_long_align_bit));
+ fprintf_unfiltered (file,
"gdbarch_dump: long_long_bit = %s\n",
plongest (gdbarch->long_long_bit));
fprintf_unfiltered (file,
@@ -1424,6 +1431,23 @@ set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
}
int
+gdbarch_long_long_align_bit (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ /* Skip verify of long_long_align_bit, invalid_p == 0 */
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_align_bit called\n");
+ return gdbarch->long_long_align_bit;
+}
+
+void
+set_gdbarch_long_long_align_bit (struct gdbarch *gdbarch,
+ int long_long_align_bit)
+{
+ gdbarch->long_long_align_bit = long_long_align_bit;
+}
+
+int
gdbarch_half_bit (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);