aboutsummaryrefslogtreecommitdiff
path: root/gdb/x86-64-tdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/x86-64-tdep.c')
-rw-r--r--gdb/x86-64-tdep.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/gdb/x86-64-tdep.c b/gdb/x86-64-tdep.c
index 50b0227..94f57a5 100644
--- a/gdb/x86-64-tdep.c
+++ b/gdb/x86-64-tdep.c
@@ -195,7 +195,7 @@ x86_64_register_convert_to_virtual (int regnum, struct type *type,
char *from, char *to)
{
char buf[12];
- DOUBLEST d;
+
/* We only support floating-point values. */
if (TYPE_CODE (type) != TYPE_CODE_FLT)
{
@@ -372,18 +372,18 @@ classify_argument (struct type *type,
case TYPE_CODE_STRUCT:
{
int j;
- for (j = 0; j < type->nfields; ++j)
+ for (j = 0; j < TYPE_NFIELDS (type); ++j)
{
- int num = classify_argument (type->fields[j].type,
+ int num = classify_argument (TYPE_FIELDS (type)[j].type,
subclasses,
- (type->fields[j].loc.bitpos
+ (TYPE_FIELDS (type)[j].loc.bitpos
+ bit_offset) % 256);
if (!num)
return 0;
for (i = 0; i < num; i++)
{
int pos =
- (type->fields[j].loc.bitpos + bit_offset) / 8 / 8;
+ (TYPE_FIELDS (type)[j].loc.bitpos + bit_offset) / 8 / 8;
classes[i + pos] =
merge_classes (subclasses[i], classes[i + pos]);
}
@@ -394,7 +394,7 @@ classify_argument (struct type *type,
{
int num;
- num = classify_argument (type->target_type,
+ num = classify_argument (TYPE_TARGET_TYPE (type),
subclasses, bit_offset);
if (!num)
return 0;
@@ -413,10 +413,10 @@ classify_argument (struct type *type,
{
int j;
{
- for (j = 0; j < type->nfields; ++j)
+ for (j = 0; j < TYPE_NFIELDS (type); ++j)
{
int num;
- num = classify_argument (type->fields[j].type,
+ num = classify_argument (TYPE_FIELDS (type)[j].type,
subclasses, bit_offset);
if (!num)
return 0;
@@ -426,6 +426,8 @@ classify_argument (struct type *type,
}
}
break;
+ default:
+ break;
}
/* Final merger cleanup. */
for (i = 0; i < words; i++)
@@ -488,6 +490,8 @@ classify_argument (struct type *type,
}
case TYPE_CODE_VOID:
return 0;
+ default: /* Avoid warning. */
+ break;
}
internal_error (__FILE__, __LINE__,
"classify_argument: unknown argument type");
@@ -998,7 +1002,7 @@ x86_64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
for (i = 0, sum = 0; i < X86_64_NUM_REGS; i++)
sum += x86_64_register_info_table[i].size;
set_gdbarch_register_bytes (gdbarch, sum);
- set_gdbarch_register_virtual_size (gdbarch, generic_register_virtual_size);
+ set_gdbarch_register_virtual_size (gdbarch, generic_register_size);
set_gdbarch_max_register_virtual_size (gdbarch, 16);
set_gdbarch_register_virtual_type (gdbarch, x86_64_register_virtual_type);