forked from Imagelibrary/binutils-gdb
Fix jit.exp on most 32-bit targets.
* gdbarch.sh: New field 'long_long_align_bit'. * gdbarch.c, gdbarch.h: Regenerate. * i386-tdep.c (i386_gdbarch_init): Set long_long_align_bit to 32. * jit.c (jit_read_code_entry): Use it to determine correct size offset.
This commit is contained in:
@@ -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;
|
||||
@@ -1019,6 +1023,9 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
|
||||
fprintf_unfiltered (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));
|
||||
@@ -1423,6 +1430,23 @@ set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
|
||||
gdbarch->long_long_bit = long_long_bit;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user