GDB (xrefs)

Classes | Macros | Functions | Variables
/tmp/gdb-8.1/gdb/m68k-tdep.c File Reference
`#include "defs.h"`
`#include "dwarf2-frame.h"`
`#include "frame.h"`
`#include "frame-base.h"`
`#include "frame-unwind.h"`
`#include "gdbtypes.h"`
`#include "symtab.h"`
`#include "gdbcore.h"`
`#include "value.h"`
`#include "inferior.h"`
`#include "regcache.h"`
`#include "arch-utils.h"`
`#include "osabi.h"`
`#include "dis-asm.h"`
`#include "target-descriptions.h"`
`#include "floatformat.h"`
`#include "target-float.h"`
`#include "m68k-tdep.h"`

Go to the source code of this file.

## Classes
struct | m68k_frame_cache

## Macros
#define | P_LINKL_FP 0x480e
#define | P_LINKW_FP 0x4e56
#define | P_PEA_FP 0x4856
#define | P_MOVEAL_SP_FP 0x2c4f
#define | P_ADDAW_SP 0xdefc
#define | P_ADDAL_SP 0xdffc
#define | P_SUBQW_SP 0x514f
#define | P_SUBQL_SP 0x518f
#define | P_LEA_SP_SP 0x4fef
#define | P_LEA_PC_A5 0x4bfb0170
#define | P_FMOVEMX_SP 0xf227
#define | P_MOVEL_SP 0x2f00
#define | P_MOVEML_SP 0x48e7
#define | SP_ARG0 (1 * 4)
#define | BPT_VECTOR 0xf

## Functions
typedef | BP_MANIPULATION (m68k_break_insn)
static struct type * | m68881_ext_type (struct gdbarch *gdbarch)
static struct type * | m68k_register_type (struct gdbarch *gdbarch, int regnum)
static const char * | m68k_register_name (struct gdbarch *gdbarch, int regnum)
static int | m68k_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
static int | m68k_register_to_value (struct frame_info *frame, int regnum, struct type *type, gdb_byte *to, int *optimizedp, int *unavailablep)
static void | m68k_value_to_register (struct frame_info *frame, int regnum, struct type *type, const gdb_byte *from)
static void | m68k_extract_return_value (struct type *type, struct regcache *regcache, gdb_byte *valbuf)
static void | m68k_svr4_extract_return_value (struct type *type, struct regcache *regcache, gdb_byte *valbuf)
static void | m68k_store_return_value (struct type *type, struct regcache *regcache, const gdb_byte *valbuf)
static void | m68k_svr4_store_return_value (struct type *type, struct regcache *regcache, const gdb_byte *valbuf)
static int | m68k_reg_struct_return_p (struct gdbarch *gdbarch, struct type *type)
static enum return_value_convention | m68k_return_value (struct gdbarch *gdbarch, struct value *function, struct type *type, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
static enum return_value_convention | m68k_svr4_return_value (struct gdbarch *gdbarch, struct value *function, struct type *type, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
static CORE_ADDR | m68k_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp)
static CORE_ADDR | m68k_push_dummy_call (struct gdbarch *gdbarch, struct value *function, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
static int | m68k_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int num)
static struct m68k_frame_cache * | m68k_alloc_frame_cache (void)
static CORE_ADDR | m68k_analyze_frame_setup (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR current_pc, struct m68k_frame_cache *cache)
static CORE_ADDR | m68k_analyze_register_saves (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR current_pc, struct m68k_frame_cache *cache)
static CORE_ADDR | m68k_analyze_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR current_pc, struct m68k_frame_cache *cache)
static CORE_ADDR | m68k_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc)
static CORE_ADDR | m68k_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
static struct m68k_frame_cache * | m68k_frame_cache (struct frame_info *this_frame, void **this_cache)
static void | m68k_frame_this_id (struct frame_info *this_frame, void **this_cache, struct frame_id *this_id)
static struct value * | m68k_frame_prev_register (struct frame_info *this_frame, void **this_cache, int regnum)
static CORE_ADDR | m68k_frame_base_address (struct frame_info *this_frame, void **this_cache)
static struct frame_id | m68k_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
static int | m68k_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc)
static int | m68k_return_in_first_hidden_param_p (struct gdbarch *gdbarch, struct type *type)
void | m68k_svr4_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
static struct gdbarch * | m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
static void | m68k_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
void | _initialize_m68k_tdep (void)

## Variables
constexpr gdb_byte | m68k_break_insn [] = {0x4e, (0x40 | BPT_VECTOR)}
static const char * | m68k_register_names []
static const struct frame_unwind | m68k_frame_unwind
static const struct frame_base | m68k_frame_base

## Macro Definition Documentation

## ◆ BPT_VECTOR

#define BPT_VECTOR 0xf

Definition at line 59 of file m68k-tdep.c.

## ◆ P_ADDAL_SP

#define P_ADDAL_SP 0xdffc

Definition at line 46 of file m68k-tdep.c.

Referenced by m68k_analyze_frame_setup().

## ◆ P_ADDAW_SP

#define P_ADDAW_SP 0xdefc

Definition at line 45 of file m68k-tdep.c.

Referenced by m68k_analyze_frame_setup().

## ◆ P_FMOVEMX_SP

#define P_FMOVEMX_SP 0xf227

Definition at line 51 of file m68k-tdep.c.

Referenced by m68k_analyze_register_saves().

## ◆ P_LEA_PC_A5

#define P_LEA_PC_A5 0x4bfb0170

Definition at line 50 of file m68k-tdep.c.

Referenced by m68k_analyze_prologue().

## ◆ P_LEA_SP_SP

#define P_LEA_SP_SP 0x4fef

Definition at line 49 of file m68k-tdep.c.

Referenced by m68k_analyze_frame_setup().

## ◆ P_LINKL_FP

#define P_LINKL_FP 0x480e

Definition at line 41 of file m68k-tdep.c.

Referenced by m68k_analyze_frame_setup().

## ◆ P_LINKW_FP

#define P_LINKW_FP 0x4e56

Definition at line 42 of file m68k-tdep.c.

Referenced by m68k_analyze_frame_setup().

## ◆ P_MOVEAL_SP_FP

#define P_MOVEAL_SP_FP 0x2c4f

Definition at line 44 of file m68k-tdep.c.

Referenced by m68k_analyze_frame_setup().

## ◆ P_MOVEL_SP

#define P_MOVEL_SP 0x2f00

Definition at line 52 of file m68k-tdep.c.

Referenced by m68k_analyze_register_saves().

## ◆ P_MOVEML_SP

#define P_MOVEML_SP 0x48e7

Definition at line 53 of file m68k-tdep.c.

Referenced by m68k_analyze_register_saves().

## ◆ P_PEA_FP

#define P_PEA_FP 0x4856

Definition at line 43 of file m68k-tdep.c.

Referenced by m68k_analyze_frame_setup().

## ◆ P_SUBQL_SP

#define P_SUBQL_SP 0x518f

Definition at line 48 of file m68k-tdep.c.

Referenced by m68k_analyze_frame_setup().

## ◆ P_SUBQW_SP

#define P_SUBQW_SP 0x514f

Definition at line 47 of file m68k-tdep.c.

Referenced by m68k_analyze_frame_setup().

## ◆ SP_ARG0

#define SP_ARG0 (1 * 4)

Definition at line 56 of file m68k-tdep.c.

Referenced by m68k_get_longjmp_target().

## Function Documentation

## ◆ _initialize_m68k_tdep()

void _initialize_m68k_tdep | ( | void |  | ) |

Definition at line 1285 of file m68k-tdep.c.

References gdbarch_register(), m68k_dump_tdep(), and m68k_gdbarch_init().

## ◆ BP_MANIPULATION()

typedef BP_MANIPULATION | ( | m68k_break_insn |  | ) |

Definition at line 64 of file m68k-tdep.c.

References append_flags_type_flag(), arch_flags_type(), gdbarch_tdep(), gdbarch_tdep::m68k_ps_type, and type.

## ◆ m68881_ext_type()

static struct type* m68881_ext_type | ( | struct gdbarch * | gdbarch | ) |
| static

Definition at line 98 of file m68k-tdep.c.

References arch_float_type(), floatformats_m68881_ext, gdbarch_tdep(), and gdbarch_tdep::m68881_ext_type.

Referenced by m68k_register_type().

## ◆ m68k_alloc_frame_cache()

static struct m68k_frame_cache* m68k_alloc_frame_cache | ( | void |  | ) |
| static

Definition at line 589 of file m68k-tdep.c.

References m68k_frame_cache::base, FRAME_OBSTACK_ZALLOC, m68k_frame_cache::locals, M68K_NUM_REGS, m68k_frame_cache::pc, m68k_frame_cache::saved_regs, and m68k_frame_cache::sp_offset.

Referenced by m68k_frame_cache().

## ◆ m68k_analyze_frame_setup()

static CORE_ADDR m68k_analyze_frame_setup | ( | struct gdbarch * | gdbarch,
|  | CORE_ADDR | pc,
|  | CORE_ADDR | current_pc,
|  | struct m68k_frame_cache * | cache
| ) |  |
| static

Definition at line 619 of file m68k-tdep.c.

References gdbarch_byte_order(), m68k_frame_cache::locals, M68K_FP_REGNUM, P_ADDAL_SP, P_ADDAW_SP, P_LEA_SP_SP, P_LINKL_FP, P_LINKW_FP, P_MOVEAL_SP_FP, P_PEA_FP, P_SUBQL_SP, P_SUBQW_SP, m68k_frame_cache::pc, read_memory_integer(), read_memory_unsigned_integer(), m68k_frame_cache::saved_regs, and m68k_frame_cache::sp_offset.

Referenced by m68k_analyze_prologue().

## ◆ m68k_analyze_prologue()

static CORE_ADDR m68k_analyze_prologue | ( | struct gdbarch * | gdbarch,
|  | CORE_ADDR | pc,
|  | CORE_ADDR | current_pc,
|  | struct m68k_frame_cache * | cache
| ) |  |
| static

Definition at line 818 of file m68k-tdep.c.

References gdbarch_byte_order(), m68k_analyze_frame_setup(), m68k_analyze_register_saves(), P_LEA_PC_A5, m68k_frame_cache::pc, and read_memory_unsigned_integer().

Referenced by m68k_frame_cache(), and m68k_skip_prologue().

## ◆ m68k_analyze_register_saves()

static CORE_ADDR m68k_analyze_register_saves | ( | struct gdbarch * | gdbarch,
|  | CORE_ADDR | pc,
|  | CORE_ADDR | current_pc,
|  | struct m68k_frame_cache * | cache
| ) |  |
| static

Definition at line 717 of file m68k-tdep.c.

References gdbarch_byte_order(), m68k_frame_cache::locals, M68K_FP0_REGNUM, offset, P_FMOVEMX_SP, P_MOVEL_SP, P_MOVEML_SP, m68k_frame_cache::pc, read_memory_unsigned_integer(), and m68k_frame_cache::saved_regs.

Referenced by m68k_analyze_prologue().

## ◆ m68k_convert_register_p()

static int m68k_convert_register_p | ( | struct gdbarch * | gdbarch,
|  | int | regnum,
|  | struct type * | type
| ) |  |
| static

Definition at line 187 of file m68k-tdep.c.

References gdbarch_tdep::fpregs_present, M68K_FP0_REGNUM, register_type(), regnum, TYPE_CODE, and TYPE_CODE_FLT.

Referenced by m68k_gdbarch_init().

## ◆ m68k_dummy_id()

static struct frame_id m68k_dummy_id | ( | struct gdbarch * | gdbarch,
|  | struct frame_info * | this_frame
| ) |  |
| static

Definition at line 990 of file m68k-tdep.c.

References frame_id_build(), get_frame_pc(), get_frame_register_unsigned(), and M68K_FP_REGNUM.

Referenced by m68k_gdbarch_init().

## ◆ m68k_dump_tdep()

static void m68k_dump_tdep | ( | struct gdbarch * | gdbarch,
|  | struct ui_file * | file
| ) |  |
| static

Definition at line 1276 of file m68k-tdep.c.

References gdbarch_tdep().

Referenced by _initialize_m68k_tdep().

## ◆ m68k_dwarf_reg_to_regnum()

static int m68k_dwarf_reg_to_regnum | ( | struct gdbarch * | gdbarch,
|  | int | num
| ) |  |
| static

Definition at line 552 of file m68k-tdep.c.

References M68K_A0_REGNUM, M68K_D0_REGNUM, M68K_FP0_REGNUM, and M68K_PC_REGNUM.

Referenced by m68k_gdbarch_init().

## ◆ m68k_extract_return_value()

static void m68k_extract_return_value | ( | struct type * | type,
|  | struct regcache * | regcache,
|  | gdb_byte * | valbuf
| ) |  |
| static

Definition at line 281 of file m68k-tdep.c.

References _, internal_error(), M68K_D0_REGNUM, M68K_D1_REGNUM, M68K_MAX_REGISTER_SIZE, regcache_raw_read(), and TYPE_LENGTH.

Referenced by m68k_return_value(), and m68k_svr4_extract_return_value().

## ◆ m68k_frame_align()

static CORE_ADDR m68k_frame_align | ( | struct gdbarch * | gdbarch,
|  | CORE_ADDR | sp
| ) |  |
| static

Definition at line 487 of file m68k-tdep.c.

References gdbarch_tdep::sp.

Referenced by m68k_gdbarch_init().

## ◆ m68k_frame_base_address()

static CORE_ADDR m68k_frame_base_address | ( | struct frame_info * | this_frame,
|  | void ** | this_cache
| ) |  |
| static

Definition at line 974 of file m68k-tdep.c.

References m68k_frame_cache::base, and m68k_frame_cache().

## ◆ m68k_frame_cache()

static struct m68k_frame_cache* m68k_frame_cache | ( | struct frame_info * | this_frame,
|  | void ** | this_cache
| ) |  |
| static

Definition at line 867 of file m68k-tdep.c.

References m68k_frame_cache::base, gdbarch::byte_order, extract_unsigned_integer(), gdbarch_byte_order(), get_frame_arch(), get_frame_func(), get_frame_pc(), get_frame_register(), m68k_frame_cache::locals, m68k_alloc_frame_cache(), m68k_analyze_prologue(), M68K_FP_REGNUM, M68K_NUM_REGS, M68K_PC_REGNUM, M68K_SP_REGNUM, m68k_frame_cache::pc, m68k_frame_cache::saved_regs, m68k_frame_cache::saved_sp, and m68k_frame_cache::sp_offset.

Referenced by m68k_frame_base_address(), m68k_frame_prev_register(), and m68k_frame_this_id().

## ◆ m68k_frame_prev_register()

static struct value* m68k_frame_prev_register | ( | struct frame_info * | this_frame,
|  | void ** | this_cache,
|  | int | regnum
| ) |  |
| static

Definition at line 946 of file m68k-tdep.c.

References frame_unwind_got_constant(), frame_unwind_got_memory(), frame_unwind_got_register(), gdb_assert, m68k_frame_cache(), M68K_SP_REGNUM, regnum, m68k_frame_cache::saved_regs, and m68k_frame_cache::saved_sp.

## ◆ m68k_frame_this_id()

static void m68k_frame_this_id | ( | struct frame_info * | this_frame,
|  | void ** | this_cache,
|  | struct frame_id * | this_id
| ) |  |
| static

Definition at line 932 of file m68k-tdep.c.

References m68k_frame_cache::base, frame_id_build(), m68k_frame_cache(), and m68k_frame_cache::pc.

## ◆ m68k_gdbarch_init()

static struct gdbarch* m68k_gdbarch_init | ( | struct gdbarch_info | info,
|  | struct gdbarch_list * | arches
| ) |  |
| static

Definition at line 1073 of file m68k-tdep.c.

References gdbarch_info::bfd_arch_info, core_addr_lessthan(), dwarf2_append_unwinders(), gdbarch_tdep::flavour, gdbarch_tdep::float_return, floatformats_ieee_double, floatformats_m68881_ext, gdbarch_tdep::fpregs_present, frame_base_set_default(), frame_unwind_append_unwinder(), gdbarch_list::gdbarch, gdbarch_alloc(), gdbarch_init_osabi(), gdbarch_list_lookup_by_info(), gdbarch_tdep::jb_elt_size, gdbarch_tdep::jb_pc, M68K_A1_REGNUM, m68k_coldfire_flavour, m68k_convert_register_p(), m68k_dummy_id(), m68k_dwarf_reg_to_regnum(), m68k_fido_flavour, M68K_FP0_REGNUM, M68K_FPI_REGNUM, m68k_frame_align(), m68k_frame_base, m68k_frame_unwind, m68k_get_longjmp_target(), m68k_no_flavour, M68K_NUM_REGS, M68K_PC_REGNUM, M68K_PS_REGNUM, m68k_push_dummy_call(), m68k_register_name(), m68k_register_names, m68k_register_to_value(), m68k_register_type(), m68k_return_in_first_hidden_param_p(), m68k_return_value(), m68k_skip_prologue(), M68K_SP_REGNUM, m68k_unwind_pc(), m68k_value_to_register(), gdbarch_list::next, reg_struct_return, set_gdbarch_believe_pcc_promotion(), set_gdbarch_breakpoint_kind_from_pc(), set_gdbarch_convert_register_p(), set_gdbarch_decr_pc_after_break(), set_gdbarch_dummy_id(), set_gdbarch_dwarf2_reg_to_regnum(), set_gdbarch_fp0_regnum(), set_gdbarch_frame_align(), set_gdbarch_frame_args_skip(), set_gdbarch_get_longjmp_target(), set_gdbarch_inner_than(), set_gdbarch_long_double_bit(), set_gdbarch_long_double_format(), set_gdbarch_num_regs(), set_gdbarch_pc_regnum(), set_gdbarch_ps_regnum(), set_gdbarch_push_dummy_call(), set_gdbarch_register_name(), set_gdbarch_register_to_value(), set_gdbarch_register_type(), set_gdbarch_return_in_first_hidden_param_p(), set_gdbarch_return_value(), set_gdbarch_skip_prologue(), set_gdbarch_sp_regnum(), set_gdbarch_sw_breakpoint_from_kind(), set_gdbarch_unwind_pc(), set_gdbarch_value_to_register(), gdbarch_tdep::struct_return, gdbarch_tdep::struct_value_regnum, gdbarch_info::target_desc, tdesc_data, tdesc_data_alloc(), tdesc_data_cleanup(), tdesc_find_feature(), tdesc_has_registers(), tdesc_numbered_register(), tdesc_use_registers(), and XCNEW.

Referenced by _initialize_m68k_tdep().

## ◆ m68k_get_longjmp_target()

static int m68k_get_longjmp_target | ( | struct frame_info * | frame,
|  | CORE_ADDR * | pc
| ) |  |
| static

Definition at line 1007 of file m68k-tdep.c.

References _, extract_unsigned_integer(), gdbarch_byte_order(), gdbarch_ptr_bit(), gdbarch_sp_regnum(), gdbarch_tdep(), get_frame_arch(), get_frame_register_unsigned(), internal_error(), gdbarch_tdep::jb_elt_size, gdbarch_tdep::jb_pc, gdbarch_tdep::pc, gdbarch_tdep::sp, SP_ARG0, TARGET_CHAR_BIT, and target_read_memory().

Referenced by m68k_gdbarch_init().

## ◆ m68k_push_dummy_call()

static CORE_ADDR m68k_push_dummy_call | ( | struct gdbarch * | gdbarch,
|  | struct value * | function,
|  | struct regcache * | regcache,
|  | CORE_ADDR | bp_addr,
|  | int | nargs,
|  | struct value ** | args,
|  | CORE_ADDR | sp,
|  | int | struct_return,
|  | CORE_ADDR | struct_addr
| ) |  |
| static

Definition at line 494 of file m68k-tdep.c.

References gdbarch_byte_order(), gdbarch_tdep(), M68K_FP_REGNUM, M68K_SP_REGNUM, offset, regcache_cooked_write(), store_unsigned_integer(), gdbarch_tdep::struct_value_regnum, TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_STRUCT, TYPE_CODE_UNION, TYPE_LENGTH, value_contents_all(), value_enclosing_type(), value_type(), and write_memory().

Referenced by m68k_gdbarch_init().

## ◆ m68k_reg_struct_return_p()

static int m68k_reg_struct_return_p | ( | struct gdbarch * | gdbarch,
|  | struct type * | type
| ) |  |
| static

Definition at line 372 of file m68k-tdep.c.

References code, gdb_assert, gdbarch_tdep(), pcc_struct_return, gdbarch_tdep::struct_return, TYPE_CODE, TYPE_CODE_COMPLEX, TYPE_CODE_STRUCT, TYPE_CODE_UNION, and TYPE_LENGTH.

Referenced by m68k_return_value(), and m68k_svr4_return_value().

## ◆ m68k_register_name()

static const char* m68k_register_name | ( | struct gdbarch * | gdbarch,
|  | int | regnum
| ) |  |
| static

Definition at line 170 of file m68k-tdep.c.

References _, gdbarch_tdep::fpregs_present, internal_error(), M68K_FP0_REGNUM, M68K_FPI_REGNUM, m68k_register_names, and regnum.

Referenced by m68k_gdbarch_init().

## ◆ m68k_register_to_value()

static int m68k_register_to_value | ( | struct frame_info * | frame,
|  | int | regnum,
|  | struct type * | type,
|  | gdb_byte * | to,
|  | int * | optimizedp,
|  | int * | unavailablep
| ) |  |
| static

Definition at line 202 of file m68k-tdep.c.

References gdb_assert, get_frame_arch(), get_frame_register_bytes(), M68K_FP0_REGNUM, M68K_MAX_REGISTER_SIZE, register_size(), register_type(), regnum, target_float_convert(), TYPE_CODE, and TYPE_CODE_FLT.

Referenced by m68k_gdbarch_init().

## ◆ m68k_register_type()

static struct type* m68k_register_type | ( | struct gdbarch * | gdbarch,
|  | int | regnum
| ) |  |
| static

Definition at line 119 of file m68k-tdep.c.

References builtin_type::builtin_data_ptr, builtin_type::builtin_double, builtin_type::builtin_func_ptr, builtin_type::builtin_int0, builtin_type::builtin_int32, builtin_type(), gdbarch_tdep::flavour, gdbarch_tdep::fpregs_present, gdbarch_fp0_regnum(), gdbarch_pc_regnum(), gdbarch_tdep(), m68881_ext_type(), M68K_A0_REGNUM, m68k_coldfire_flavour, M68K_FP0_REGNUM, M68K_FPC_REGNUM, M68K_FPI_REGNUM, M68K_FPS_REGNUM, M68K_PS_REGNUM, gdbarch_tdep::m68k_ps_type, and regnum.

Referenced by m68k_gdbarch_init().

## ◆ m68k_return_in_first_hidden_param_p()

static int m68k_return_in_first_hidden_param_p | ( | struct gdbarch * | gdbarch,
|  | struct type * | type
| ) |  |
| static

Definition at line 1047 of file m68k-tdep.c.

Referenced by m68k_gdbarch_init().

## ◆ m68k_return_value()

static enum return_value_convention m68k_return_value | ( | struct gdbarch * | gdbarch,
|  | struct value * | function,
|  | struct type * | type,
|  | struct regcache * | regcache,
|  | gdb_byte * | readbuf,
|  | const gdb_byte * | writebuf
| ) |  |
| static

Definition at line 394 of file m68k-tdep.c.

References code, M68K_D0_REGNUM, m68k_extract_return_value(), m68k_reg_struct_return_p(), m68k_store_return_value(), read_memory(), regcache_raw_read_unsigned(), RETURN_VALUE_ABI_RETURNS_ADDRESS, RETURN_VALUE_REGISTER_CONVENTION, TYPE_CODE, TYPE_CODE_COMPLEX, TYPE_CODE_FLT, TYPE_CODE_STRUCT, TYPE_CODE_UNION, and TYPE_LENGTH.

Referenced by m68k_gdbarch_init().

## ◆ m68k_skip_prologue()

static CORE_ADDR m68k_skip_prologue | ( | struct gdbarch * | gdbarch,
|  | CORE_ADDR | start_pc
| ) |  |
| static

Definition at line 843 of file m68k-tdep.c.

References m68k_frame_cache::locals, m68k_analyze_prologue(), and m68k_frame_cache::pc.

Referenced by m68k_gdbarch_init().

## ◆ m68k_store_return_value()

static void m68k_store_return_value | ( | struct type * | type,
|  | struct regcache * | regcache,
|  | const gdb_byte * | valbuf
| ) |  |
| static

Definition at line 326 of file m68k-tdep.c.

References _, internal_error(), M68K_D0_REGNUM, M68K_D1_REGNUM, regcache_raw_write(), regcache_raw_write_part(), and TYPE_LENGTH.

Referenced by m68k_return_value(), and m68k_svr4_store_return_value().

## ◆ m68k_svr4_extract_return_value()

static void m68k_svr4_extract_return_value | ( | struct type * | type,
|  | struct regcache * | regcache,
|  | gdb_byte * | valbuf
| ) |  |
| static

Definition at line 304 of file m68k-tdep.c.

References regcache::arch(), gdbarch_tdep::float_return, gdbarch_tdep(), M68K_A0_REGNUM, m68k_extract_return_value(), M68K_FP0_REGNUM, M68K_MAX_REGISTER_SIZE, regcache_raw_read(), register_type(), target_float_convert(), TYPE_CODE, TYPE_CODE_FLT, TYPE_CODE_PTR, and TYPE_LENGTH.

Referenced by m68k_svr4_return_value().

## ◆ m68k_svr4_init_abi()

void m68k_svr4_init_abi | ( | struct gdbarch_info | info,
|  | struct gdbarch * | gdbarch
| ) |  |

Definition at line 1056 of file m68k-tdep.c.

References gdbarch_tdep(), M68K_A0_REGNUM, m68k_svr4_return_value(), set_gdbarch_return_value(), and gdbarch_tdep::struct_value_regnum.

Referenced by m68k_linux_init_abi(), and m68kbsd_init_abi().

## ◆ m68k_svr4_return_value()

static enum return_value_convention m68k_svr4_return_value | ( | struct gdbarch * | gdbarch,
|  | struct value * | function,
|  | struct type * | type,
|  | struct regcache * | regcache,
|  | gdb_byte * | readbuf,
|  | const gdb_byte * | writebuf
| ) |  |
| static

Definition at line 430 of file m68k-tdep.c.

References check_typedef(), code, M68K_A0_REGNUM, m68k_reg_struct_return_p(), m68k_svr4_extract_return_value(), m68k_svr4_store_return_value(), read_memory(), regcache_raw_read_unsigned(), RETURN_VALUE_ABI_RETURNS_ADDRESS, RETURN_VALUE_REGISTER_CONVENTION, TYPE_CODE, TYPE_CODE_COMPLEX, TYPE_CODE_STRUCT, TYPE_CODE_UNION, TYPE_FIELD_TYPE, TYPE_LENGTH, and TYPE_NFIELDS.

Referenced by m68k_svr4_init_abi().

## ◆ m68k_svr4_store_return_value()

static void m68k_svr4_store_return_value | ( | struct type * | type,
|  | struct regcache * | regcache,
|  | const gdb_byte * | valbuf
| ) |  |
| static

Definition at line 345 of file m68k-tdep.c.

References regcache::arch(), gdbarch_tdep::float_return, gdbarch_tdep(), M68K_A0_REGNUM, M68K_D0_REGNUM, M68K_FP0_REGNUM, M68K_MAX_REGISTER_SIZE, m68k_store_return_value(), regcache_raw_write(), register_type(), target_float_convert(), TYPE_CODE, TYPE_CODE_FLT, TYPE_CODE_PTR, and TYPE_LENGTH.

Referenced by m68k_svr4_return_value().

## ◆ m68k_unwind_pc()

static CORE_ADDR m68k_unwind_pc | ( | struct gdbarch * | gdbarch,
|  | struct frame_info * | next_frame
| ) |  |
| static

Definition at line 856 of file m68k-tdep.c.

References extract_typed_address(), frame_unwind_register(), and gdbarch_pc_regnum().

Referenced by m68k_gdbarch_init().

## ◆ m68k_value_to_register()

static void m68k_value_to_register | ( | struct frame_info * | frame,
|  | int | regnum,
|  | struct type * | type,
|  | const gdb_byte * | from
| ) |  |
| static

Definition at line 227 of file m68k-tdep.c.

References _, get_frame_arch(), M68K_FP0_REGNUM, M68K_MAX_REGISTER_SIZE, put_frame_register(), register_type(), regnum, target_float_convert(), TYPE_CODE, TYPE_CODE_FLT, and warning().

Referenced by m68k_gdbarch_init().

## Variable Documentation

## ◆ m68k_break_insn

constexpr gdb_byte m68k_break_insn[] = {0x4e, (0x40 | BPT_VECTOR)}

Definition at line 62 of file m68k-tdep.c.

## ◆ m68k_frame_base

const struct frame_base m68k_frame_base
| static

Initial value:
=
{
&m68k_frame_unwind,
m68k_frame_base_address,
m68k_frame_base_address,
m68k_frame_base_address
}
m68k_frame_base_address
static CORE_ADDR m68k_frame_base_address(struct frame_info *this_frame, void **this_cache)
Definition: m68k-tdep.c:974
m68k_frame_unwind
static const struct frame_unwind m68k_frame_unwind
Definition: m68k-tdep.c:963

Definition at line 981 of file m68k-tdep.c.

Referenced by m68k_gdbarch_init().

## ◆ m68k_frame_unwind

const struct frame_unwind m68k_frame_unwind
| static

Initial value:
=
{
NORMAL_FRAME,
default_frame_unwind_stop_reason,
m68k_frame_this_id,
m68k_frame_prev_register,
NULL,
default_frame_sniffer
}
m68k_frame_prev_register
static struct value * m68k_frame_prev_register(struct frame_info *this_frame, void **this_cache, int regnum)
Definition: m68k-tdep.c:946
NORMAL_FRAME
Definition: frame.h:244
m68k_frame_this_id
static void m68k_frame_this_id(struct frame_info *this_frame, void **this_cache, struct frame_id *this_id)
Definition: m68k-tdep.c:932
default_frame_sniffer
int default_frame_sniffer(const struct frame_unwind *self, struct frame_info *this_frame, void **this_prologue_cache)
Definition: frame-unwind.c:174
default_frame_unwind_stop_reason
enum unwind_stop_reason default_frame_unwind_stop_reason(struct frame_info *this_frame, void **this_cache)
Definition: frame-unwind.c:184

Definition at line 963 of file m68k-tdep.c.

Referenced by m68k_gdbarch_init().

## ◆ m68k_register_names

const char* m68k_register_names[]
| static

Initial value:
= {
"d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7",
"a0", "a1", "a2", "a3", "a4", "a5", "fp", "sp",
"ps", "pc",
"fp0", "fp1", "fp2", "fp3", "fp4", "fp5", "fp6", "fp7",
"fpcontrol", "fpstatus", "fpiaddr"
}

Definition at line 158 of file m68k-tdep.c.

Referenced by m68k_gdbarch_init(), and m68k_register_name().