return x86_64_dwarf2gdb_regno_map[dw_reg];
}
-/* This is the variable that is set with "set disassembly-flavour", and
- its legitimate values. */
-static const char att_flavour[] = "att";
-static const char intel_flavour[] = "intel";
-static const char *valid_flavours[] = {
- att_flavour,
- intel_flavour,
- NULL
-};
-static const char *disassembly_flavour = att_flavour;
-
/* Push the return address (pointing to the call dummy) onto the stack
and return the new value for the stack pointer. */
return 2;
}
break;
+ case TYPE_CODE_ENUM:
+ case TYPE_CODE_REF:
case TYPE_CODE_INT:
case TYPE_CODE_PTR:
switch (bytes)
intreg += 2;
break;
case X86_64_INTEGERSI_CLASS:
- deprecated_write_register_gen (int_parameter_registers[intreg / 2],
- VALUE_CONTENTS_ALL (args[i]) + offset);
- offset += 8;
- intreg++;
- break;
+ {
+ LONGEST num
+ = extract_signed_integer (VALUE_CONTENTS_ALL (args[i])
+ + offset, 4);
+ regcache_raw_write_signed (current_regcache,
+ int_parameter_registers[intreg / 2], num);
+
+ offset += 8;
+ intreg++;
+ break;
+ }
case X86_64_SSEDF_CLASS:
case X86_64_SSESF_CLASS:
case X86_64_SSE_CLASS:
floating point format used by the FPU. This is probably
not exactly how it would happen on the target itself, but
it is the best we can do. */
- val = extract_floating (valbuf, TYPE_LENGTH (type));
+ val = deprecated_extract_floating (valbuf, TYPE_LENGTH (type));
floatformat_from_doublest (&floatformat_i387_ext, &val, buf);
regcache_cooked_write_part (regcache, FP0_REGNUM,
0, FPU_REG_RAW_SIZE, buf);
}
\f
-
-/* We have two flavours of disassembly. The machinery on this page
- deals with switching between those. */
-
-static int
-gdb_print_insn_x86_64 (bfd_vma memaddr, disassemble_info * info)
-{
- if (disassembly_flavour == att_flavour)
- return print_insn_i386_att (memaddr, info);
- else if (disassembly_flavour == intel_flavour)
- return print_insn_i386_intel (memaddr, info);
- /* Never reached -- disassembly_flavour is always either att_flavour
- or intel_flavour. */
- internal_error (__FILE__, __LINE__, "failed internal consistency check");
-}
-\f
-
/* Store the address of the place in which to copy the structure the
subroutine will return. This is called from call_function. */
void
return pc;
}
-/* Sequence of bytes for breakpoint instruction. */
-static const unsigned char *
-x86_64_breakpoint_from_pc (CORE_ADDR *pc, int *lenptr)
-{
- static unsigned char breakpoint[] = { 0xcc };
- *lenptr = 1;
- return breakpoint;
-}
-
static void
x86_64_save_dummy_frame_tos (CORE_ADDR sp)
{
static struct frame_id
x86_64_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *frame)
{
- struct frame_id id;
-
- id.pc = frame_pc_unwind (frame);
- frame_unwind_unsigned_register (frame, SP_REGNUM, &id.base);
-
- return id;
+ CORE_ADDR base;
+ frame_unwind_unsigned_register (frame, SP_REGNUM, &base);
+ return frame_id_build (base, frame_pc_unwind (frame));
}
void
/* Register numbers of various important registers. */
set_gdbarch_sp_regnum (gdbarch, 7); /* %rsp */
- set_gdbarch_fp_regnum (gdbarch, 6); /* %rbp */
+ set_gdbarch_deprecated_fp_regnum (gdbarch, 6); /* %rbp */
set_gdbarch_pc_regnum (gdbarch, 16); /* %rip */
set_gdbarch_ps_regnum (gdbarch, 17); /* %eflags */
set_gdbarch_fp0_regnum (gdbarch, X86_64_NUM_GREGS); /* %st(0) */
in use on any of the supported x86-64 targets. */
set_gdbarch_register_name (gdbarch, x86_64_register_name);
- set_gdbarch_register_size (gdbarch, 8);
+ set_gdbarch_deprecated_register_size (gdbarch, 8);
/* Total amount of space needed to store our copies of the machine's
register (SIZEOF_GREGS + SIZEOF_FPU_REGS + SIZEOF_FPU_CTRL_REGS +
set_gdbarch_deprecated_get_saved_register (gdbarch, cfi_get_saved_register);
/* FIXME: kettenis/20021026: Should we set parm_boundary to 64 here? */
- set_gdbarch_read_fp (gdbarch, cfi_read_fp);
+ set_gdbarch_deprecated_target_read_fp (gdbarch, cfi_read_fp);
set_gdbarch_extract_return_value (gdbarch, x86_64_extract_return_value);
set_gdbarch_deprecated_push_arguments (gdbarch, x86_64_push_arguments);
- set_gdbarch_push_return_address (gdbarch, x86_64_push_return_address);
+ set_gdbarch_deprecated_push_return_address (gdbarch, x86_64_push_return_address);
set_gdbarch_deprecated_pop_frame (gdbarch, x86_64_pop_frame);
set_gdbarch_deprecated_store_struct_return (gdbarch, x86_64_store_struct_return);
set_gdbarch_store_return_value (gdbarch, x86_64_store_return_value);
/* FIXME: kettenis/20021026: These two are GNU/Linux-specific and
should be moved elsewhere. */
set_gdbarch_deprecated_frame_saved_pc (gdbarch, x86_64_linux_frame_saved_pc);
- set_gdbarch_saved_pc_after_call (gdbarch, x86_64_linux_saved_pc_after_call);
+ set_gdbarch_deprecated_saved_pc_after_call (gdbarch, x86_64_linux_saved_pc_after_call);
set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown);
/* FIXME: kettenis/20021026: This one is GNU/Linux-specific too. */
set_gdbarch_pc_in_sigtramp (gdbarch, x86_64_linux_in_sigtramp);