GDB (xrefs)

Classes | Macros | Enumerations | Functions | Variables
/tmp/gdb-8.1/gdb/m68hc11-tdep.c File Reference
`#include "defs.h"`
`#include "frame.h"`
`#include "frame-unwind.h"`
`#include "frame-base.h"`
`#include "dwarf2-frame.h"`
`#include "trad-frame.h"`
`#include "symtab.h"`
`#include "gdbtypes.h"`
`#include "gdbcmd.h"`
`#include "gdbcore.h"`
`#include "value.h"`
`#include "inferior.h"`
`#include "dis-asm.h"`
`#include "symfile.h"`
`#include "objfiles.h"`
`#include "arch-utils.h"`
`#include "regcache.h"`
`#include "reggroups.h"`
`#include "target.h"`
`#include "opcode/m68hc11.h"`
`#include "elf/m68hc11.h"`
`#include "elf-bfd.h"`

Go to the source code of this file.

## Classes
struct | gdbarch_tdep
struct | m68hc11_unwind_cache
struct | m68hc11_soft_reg
struct | insn_sequence

## Macros
#define | MSYMBOL_SET_RTC(msym) MSYMBOL_TARGET_FLAG_1 (msym) = 1
#define | MSYMBOL_SET_RTI(msym) MSYMBOL_TARGET_FLAG_2 (msym) = 1
#define | MSYMBOL_IS_RTC(msym) MSYMBOL_TARGET_FLAG_1 (msym)
#define | MSYMBOL_IS_RTI(msym) MSYMBOL_TARGET_FLAG_2 (msym)
#define | HARD_X_REGNUM 0
#define | HARD_D_REGNUM 1
#define | HARD_Y_REGNUM 2
#define | HARD_SP_REGNUM 3
#define | HARD_PC_REGNUM 4
#define | HARD_A_REGNUM 5
#define | HARD_B_REGNUM 6
#define | HARD_CCR_REGNUM 7
#define | HARD_PAGE_REGNUM 8
#define | M68HC11_LAST_HARD_REG (HARD_PAGE_REGNUM)
#define | SOFT_Z_REGNUM 8
#define | SOFT_FP_REGNUM 9
#define | SOFT_TMP_REGNUM 10
#define | SOFT_ZS_REGNUM 11
#define | SOFT_XY_REGNUM 12
#define | SOFT_UNUSED_REGNUM 13
#define | SOFT_D1_REGNUM 14
#define | SOFT_D32_REGNUM (SOFT_D1_REGNUM+31)
#define | M68HC11_MAX_SOFT_REGS 32
#define | M68HC11_NUM_REGS (M68HC11_LAST_HARD_REG + 1)
#define | M68HC11_NUM_PSEUDO_REGS (M68HC11_MAX_SOFT_REGS+5)
#define | M68HC11_ALL_REGS (M68HC11_NUM_REGS+M68HC11_NUM_PSEUDO_REGS)
#define | M68HC11_REG_SIZE (2)
#define | M68HC12_NUM_REGS (9)
#define | M68HC12_NUM_PSEUDO_REGS ((M68HC11_MAX_SOFT_REGS+5)+1-1)
#define | M68HC12_HARD_PC_REGNUM (SOFT_D32_REGNUM+1)
#define | STACK_CORRECTION(gdbarch) (gdbarch_tdep (gdbarch)->stack_correction)
#define | USE_PAGE_REGISTER(gdbarch) (gdbarch_tdep (gdbarch)->use_page_register)
#define | M68HC11_FP_ADDR soft_regs[SOFT_FP_REGNUM].addr
#define | MAX_CODES 12
#define | M6811_OP_PAGE2 (0x18)
#define | M6811_OP_LDX (0xde)
#define | M6811_OP_LDX_EXT (0xfe)
#define | M6811_OP_PSHX (0x3c)
#define | M6811_OP_STS (0x9f)
#define | M6811_OP_STS_EXT (0xbf)
#define | M6811_OP_TSX (0x30)
#define | M6811_OP_XGDX (0x8f)
#define | M6811_OP_ADDD (0xc3)
#define | M6811_OP_TXS (0x35)
#define | M6811_OP_DES (0x34)
#define | M6812_OP_PAGE2 (0x18)
#define | M6812_OP_MOVW (0x01)
#define | M6812_PB_PSHW (0xae)
#define | M6812_OP_STS (0x5f)
#define | M6812_OP_STS_EXT (0x7f)
#define | M6812_OP_LEAS (0x1b)
#define | M6812_OP_PSHX (0x34)
#define | M6812_OP_PSHY (0x35)
#define | OP_DIRECT (0x100) /* 8-byte direct addressing. */
#define | OP_IMM_LOW (0x200) /* Low part of 16-bit constant/address. */
#define | OP_IMM_HIGH (0x300) /* High part of 16-bit constant/address. */
#define | OP_PBYTE (0x400) /* 68HC12 indexed operand. */

## Enumerations
enum | insn_return_kind { RETURN_RTS, RETURN_RTC, RETURN_RTI }

## Functions
static void | m68hc11_get_register_info (struct m68hc11_soft_reg *reg, const char *name)
static void | m68hc11_initialize_register_info (void)
static int | m68hc11_which_soft_register (CORE_ADDR addr)
static enum register_status | m68hc11_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int regno, gdb_byte *buf)
static void | m68hc11_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int regno, const gdb_byte *buf)
static const char * | m68hc11_register_name (struct gdbarch *gdbarch, int reg_nr)
typedef | BP_MANIPULATION (m68hc11_break_insn)
static struct insn_sequence * | m68hc11_analyze_instruction (struct gdbarch *gdbarch, struct insn_sequence *seq, CORE_ADDR pc, CORE_ADDR *val)
static enum insn_return_kind | m68hc11_get_return_insn (CORE_ADDR pc)
static CORE_ADDR | m68hc11_scan_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR current_pc, struct m68hc11_unwind_cache *info)
static CORE_ADDR | m68hc11_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
static CORE_ADDR | m68hc11_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
static struct m68hc11_unwind_cache * | m68hc11_frame_unwind_cache (struct frame_info *this_frame, void **this_prologue_cache)
static void | m68hc11_frame_this_id (struct frame_info *this_frame, void **this_prologue_cache, struct frame_id *this_id)
static struct value * | m68hc11_frame_prev_register (struct frame_info *this_frame, void **this_prologue_cache, int regnum)
static CORE_ADDR | m68hc11_frame_base_address (struct frame_info *this_frame, void **this_cache)
static CORE_ADDR | m68hc11_frame_args_address (struct frame_info *this_frame, void **this_cache)
static CORE_ADDR | m68hc11_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
static struct frame_id | m68hc11_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
static void | m68hc11_print_register (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regno)
static void | m68hc11_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regno, int cpregs)
static CORE_ADDR | m68hc11_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 struct type * | m68hc11_register_type (struct gdbarch *gdbarch, int reg_nr)
static void | m68hc11_store_return_value (struct type *type, struct regcache *regcache, const gdb_byte *valbuf)
static void | m68hc11_extract_return_value (struct type *type, struct regcache *regcache, void *valbuf)
static enum return_value_convention | m68hc11_return_value (struct gdbarch *gdbarch, struct value *function, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
static void | m68hc11_elf_make_msymbol_special (asymbol *sym, struct minimal_symbol *msym)
static void | m68hc11_init_reggroups (void)
static void | m68hc11_add_reggroups (struct gdbarch *gdbarch)
static int | m68hc11_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *group)
static struct gdbarch * | m68hc11_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
void | _initialize_m68hc11_tdep (void)

## Variables
static const char * | m68hc11_register_names []
static struct m68hc11_soft_reg | soft_regs [M68HC11_ALL_REGS]
static int | soft_min_addr
static int | soft_max_addr
static int | soft_reg_initialized = 0
constexpr gdb_byte | m68hc11_break_insn [] = {0x0}
static struct insn_sequence | m6811_prologue []
static struct insn_sequence | m6812_prologue []
static const struct frame_unwind | m68hc11_frame_unwind
static const struct frame_base | m68hc11_frame_base
static struct reggroup * | m68hc11_soft_reggroup
static struct reggroup * | m68hc11_hard_reggroup

## Macro Definition Documentation

## ◆ HARD_A_REGNUM

#define HARD_A_REGNUM 5

Definition at line 86 of file m68hc11-tdep.c.

Referenced by m68hc11_print_register(), and m68hc11_register_type().

## ◆ HARD_B_REGNUM

#define HARD_B_REGNUM 6

Definition at line 87 of file m68hc11-tdep.c.

Referenced by m68hc11_print_register(), and m68hc11_register_type().

## ◆ HARD_CCR_REGNUM

#define HARD_CCR_REGNUM 7

Definition at line 88 of file m68hc11-tdep.c.

Referenced by m68hc11_frame_unwind_cache(), m68hc11_print_register(), m68hc11_print_registers_info(), m68hc11_register_reggroup_p(), and m68hc11_register_type().

## ◆ HARD_D_REGNUM

#define HARD_D_REGNUM 1

Definition at line 81 of file m68hc11-tdep.c.

Referenced by m68hc11_extract_return_value(), m68hc11_frame_unwind_cache(), m68hc11_print_registers_info(), m68hc11_push_dummy_call(), m68hc11_register_reggroup_p(), and m68hc11_store_return_value().

## ◆ HARD_PAGE_REGNUM

#define HARD_PAGE_REGNUM 8

Definition at line 95 of file m68hc11-tdep.c.

Referenced by m68hc11_frame_prev_register(), m68hc11_frame_unwind_cache(), m68hc11_print_register(), m68hc11_print_registers_info(), m68hc11_pseudo_register_read(), m68hc11_pseudo_register_write(), and m68hc11_register_type().

## ◆ HARD_PC_REGNUM

#define HARD_PC_REGNUM 4

Definition at line 84 of file m68hc11-tdep.c.

Referenced by m68hc11_frame_prev_register(), m68hc11_frame_unwind_cache(), m68hc11_gdbarch_init(), m68hc11_print_register(), m68hc11_print_registers_info(), m68hc11_pseudo_register_read(), m68hc11_pseudo_register_write(), m68hc11_register_name(), and m68hc11_register_reggroup_p().

## ◆ HARD_SP_REGNUM

#define HARD_SP_REGNUM 3

Definition at line 83 of file m68hc11-tdep.c.

Referenced by m68hc11_frame_unwind_cache(), m68hc11_gdbarch_init(), m68hc11_print_register(), m68hc11_print_registers_info(), m68hc11_push_dummy_call(), m68hc11_register_reggroup_p(), and m68hc11_unwind_sp().

## ◆ HARD_X_REGNUM

#define HARD_X_REGNUM 0

Definition at line 80 of file m68hc11-tdep.c.

Referenced by m68hc11_extract_return_value(), m68hc11_frame_unwind_cache(), m68hc11_print_registers_info(), m68hc11_push_dummy_call(), m68hc11_register_reggroup_p(), and m68hc11_store_return_value().

## ◆ HARD_Y_REGNUM

#define HARD_Y_REGNUM 2

Definition at line 82 of file m68hc11-tdep.c.

Referenced by m68hc11_frame_unwind_cache(), m68hc11_print_registers_info(), and m68hc11_register_reggroup_p().

## ◆ M6811_OP_ADDD

#define M6811_OP_ADDD (0xc3)

## ◆ M6811_OP_DES

#define M6811_OP_DES (0x34)

## ◆ M6811_OP_LDX

#define M6811_OP_LDX (0xde)

## ◆ M6811_OP_LDX_EXT

#define M6811_OP_LDX_EXT (0xfe)

## ◆ M6811_OP_PAGE2

#define M6811_OP_PAGE2 (0x18)

## ◆ M6811_OP_PSHX

#define M6811_OP_PSHX (0x3c)

## ◆ M6811_OP_STS

#define M6811_OP_STS (0x9f)

## ◆ M6811_OP_STS_EXT

#define M6811_OP_STS_EXT (0xbf)

## ◆ M6811_OP_TSX

#define M6811_OP_TSX (0x30)

## ◆ M6811_OP_TXS

#define M6811_OP_TXS (0x35)

## ◆ M6811_OP_XGDX

#define M6811_OP_XGDX (0x8f)

## ◆ M6812_OP_LEAS

#define M6812_OP_LEAS (0x1b)

## ◆ M6812_OP_MOVW

#define M6812_OP_MOVW (0x01)

## ◆ M6812_OP_PAGE2

#define M6812_OP_PAGE2 (0x18)

## ◆ M6812_OP_PSHX

#define M6812_OP_PSHX (0x34)

## ◆ M6812_OP_PSHY

#define M6812_OP_PSHY (0x35)

## ◆ M6812_OP_STS

#define M6812_OP_STS (0x5f)

## ◆ M6812_OP_STS_EXT

#define M6812_OP_STS_EXT (0x7f)

## ◆ M6812_PB_PSHW

#define M6812_PB_PSHW (0xae)

## ◆ M68HC11_ALL_REGS

#define M68HC11_ALL_REGS (M68HC11_NUM_REGS+M68HC11_NUM_PSEUDO_REGS)

Definition at line 117 of file m68hc11-tdep.c.

Referenced by m68hc11_initialize_register_info(), m68hc11_print_registers_info(), m68hc11_register_name(), and m68hc11_which_soft_register().

## ◆ M68HC11_FP_ADDR

#define M68HC11_FP_ADDR soft_regs[SOFT_FP_REGNUM].addr

Definition at line 189 of file m68hc11-tdep.c.

## ◆ M68HC11_LAST_HARD_REG

#define M68HC11_LAST_HARD_REG (HARD_PAGE_REGNUM)

Definition at line 96 of file m68hc11-tdep.c.

Referenced by m68hc11_register_name().

## ◆ M68HC11_MAX_SOFT_REGS

#define M68HC11_MAX_SOFT_REGS 32

Definition at line 113 of file m68hc11-tdep.c.

Referenced by m68hc11_initialize_register_info().

## ◆ M68HC11_NUM_PSEUDO_REGS

#define M68HC11_NUM_PSEUDO_REGS (M68HC11_MAX_SOFT_REGS+5)

Definition at line 116 of file m68hc11-tdep.c.

Referenced by m68hc11_gdbarch_init().

## ◆ M68HC11_NUM_REGS

#define M68HC11_NUM_REGS (M68HC11_LAST_HARD_REG + 1)

Definition at line 115 of file m68hc11-tdep.c.

Referenced by m68hc11_gdbarch_init().

## ◆ M68HC11_REG_SIZE

#define M68HC11_REG_SIZE (2)

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

Referenced by m68hc11_extract_return_value().

## ◆ M68HC12_HARD_PC_REGNUM

#define M68HC12_HARD_PC_REGNUM (SOFT_D32_REGNUM+1)

Definition at line 123 of file m68hc11-tdep.c.

Referenced by m68hc11_gdbarch_init(), m68hc11_print_register(), m68hc11_pseudo_register_read(), m68hc11_pseudo_register_write(), m68hc11_register_name(), and m68hc11_register_type().

## ◆ M68HC12_NUM_PSEUDO_REGS

#define M68HC12_NUM_PSEUDO_REGS ((M68HC11_MAX_SOFT_REGS+5)+1-1)

Definition at line 122 of file m68hc11-tdep.c.

Referenced by m68hc11_gdbarch_init().

## ◆ M68HC12_NUM_REGS

#define M68HC12_NUM_REGS (9)

Definition at line 121 of file m68hc11-tdep.c.

Referenced by m68hc11_gdbarch_init().

## ◆ MAX_CODES

#define MAX_CODES 12

Referenced by m68hc11_analyze_instruction().

## ◆ MSYMBOL_IS_RTC

#define MSYMBOL_IS_RTC | ( |  | msym | ) | MSYMBOL_TARGET_FLAG_1 (msym)

Definition at line 65 of file m68hc11-tdep.c.

Referenced by m68hc11_get_return_insn().

## ◆ MSYMBOL_IS_RTI

#define MSYMBOL_IS_RTI | ( |  | msym | ) | MSYMBOL_TARGET_FLAG_2 (msym)

Definition at line 68 of file m68hc11-tdep.c.

Referenced by m68hc11_get_return_insn().

## ◆ MSYMBOL_SET_RTC

#define MSYMBOL_SET_RTC | ( |  | msym | ) | MSYMBOL_TARGET_FLAG_1 (msym) = 1

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

Referenced by m68hc11_elf_make_msymbol_special().

## ◆ MSYMBOL_SET_RTI

#define MSYMBOL_SET_RTI | ( |  | msym | ) | MSYMBOL_TARGET_FLAG_2 (msym) = 1

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

Referenced by m68hc11_elf_make_msymbol_special().

## ◆ OP_DIRECT

#define OP_DIRECT (0x100) /* 8-byte direct addressing. */

Referenced by m68hc11_analyze_instruction().

## ◆ OP_IMM_HIGH

#define OP_IMM_HIGH (0x300) /* High part of 16-bit constant/address. */

Referenced by m68hc11_analyze_instruction().

## ◆ OP_IMM_LOW

#define OP_IMM_LOW (0x200) /* Low part of 16-bit constant/address. */

Referenced by m68hc11_analyze_instruction().

## ◆ OP_PBYTE

#define OP_PBYTE (0x400) /* 68HC12 indexed operand. */

Referenced by m68hc11_analyze_instruction().

## ◆ SOFT_D1_REGNUM

#define SOFT_D1_REGNUM 14

Definition at line 111 of file m68hc11-tdep.c.

Referenced by m68hc11_initialize_register_info(), m68hc11_print_registers_info(), and m68hc11_register_reggroup_p().

## ◆ SOFT_D32_REGNUM

#define SOFT_D32_REGNUM (SOFT_D1_REGNUM+31)

Definition at line 112 of file m68hc11-tdep.c.

## ◆ SOFT_FP_REGNUM

#define SOFT_FP_REGNUM 9

Definition at line 106 of file m68hc11-tdep.c.

Referenced by m68hc11_dummy_id(), m68hc11_frame_unwind_cache(), m68hc11_initialize_register_info(), m68hc11_print_register(), m68hc11_print_registers_info(), m68hc11_push_dummy_call(), m68hc11_register_reggroup_p(), and m68hc11_which_soft_register().

## ◆ SOFT_TMP_REGNUM

#define SOFT_TMP_REGNUM 10

Definition at line 107 of file m68hc11-tdep.c.

Referenced by m68hc11_initialize_register_info(), and m68hc11_register_reggroup_p().

## ◆ SOFT_UNUSED_REGNUM

#define SOFT_UNUSED_REGNUM 13

Definition at line 110 of file m68hc11-tdep.c.

## ◆ SOFT_XY_REGNUM

#define SOFT_XY_REGNUM 12

Definition at line 109 of file m68hc11-tdep.c.

Referenced by m68hc11_initialize_register_info(), and m68hc11_register_reggroup_p().

## ◆ SOFT_Z_REGNUM

#define SOFT_Z_REGNUM 8

Definition at line 101 of file m68hc11-tdep.c.

Referenced by m68hc11_initialize_register_info().

## ◆ SOFT_ZS_REGNUM

#define SOFT_ZS_REGNUM 11

Definition at line 108 of file m68hc11-tdep.c.

Referenced by m68hc11_initialize_register_info(), and m68hc11_register_reggroup_p().

## ◆ STACK_CORRECTION

#define STACK_CORRECTION | ( |  | gdbarch | ) | (gdbarch_tdep (gdbarch)->stack_correction)

Definition at line 145 of file m68hc11-tdep.c.

Referenced by m68hc11_frame_unwind_cache(), and m68hc11_push_dummy_call().

## ◆ USE_PAGE_REGISTER

#define USE_PAGE_REGISTER | ( |  | gdbarch | ) | (gdbarch_tdep (gdbarch)->use_page_register)

Definition at line 146 of file m68hc11-tdep.c.

Referenced by m68hc11_frame_prev_register(), and m68hc11_register_name().

## Enumeration Type Documentation

## ◆ insn_return_kind

enum insn_return_kind

Enumerator
RETURN_RTS |
RETURN_RTC |
RETURN_RTI |

Definition at line 71 of file m68hc11-tdep.c.

## Function Documentation

## ◆ _initialize_m68hc11_tdep()

void _initialize_m68hc11_tdep | ( | void |  | ) |

Definition at line 1547 of file m68hc11-tdep.c.

References m68hc11_gdbarch_init(), m68hc11_init_reggroups(), and register_gdbarch_init().

## ◆ BP_MANIPULATION()

typedef BP_MANIPULATION | ( | m68hc11_break_insn |  | ) |

Definition at line 395 of file m68hc11-tdep.c.

## ◆ m68hc11_add_reggroups()

static void m68hc11_add_reggroups | ( | struct gdbarch * | gdbarch | ) |
| static

Definition at line 1363 of file m68hc11-tdep.c.

References all_reggroup, float_reggroup, general_reggroup, m68hc11_hard_reggroup, m68hc11_soft_reggroup, reggroup_add(), restore_reggroup, save_reggroup, system_reggroup, and vector_reggroup.

Referenced by m68hc11_gdbarch_init().

## ◆ m68hc11_analyze_instruction()

static struct insn_sequence* m68hc11_analyze_instruction | ( | struct gdbarch * | gdbarch,
|  | struct insn_sequence * | seq,
|  | CORE_ADDR | pc,
|  | CORE_ADDR * | val
| ) |  |
| static

Definition at line 499 of file m68hc11-tdep.c.

References insn_sequence::code, gdbarch_byte_order(), insn_sequence::length, MAX_CODES, OP_DIRECT, OP_IMM_HIGH, OP_IMM_LOW, OP_PBYTE, read_memory_unsigned_integer(), and insn_sequence::type.

Referenced by m68hc11_scan_prologue().

## ◆ m68hc11_dummy_id()

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

Definition at line 995 of file m68hc11-tdep.c.

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

Referenced by m68hc11_gdbarch_init().

## ◆ m68hc11_elf_make_msymbol_special()

static void m68hc11_elf_make_msymbol_special | ( | asymbol * | sym,
|  | struct minimal_symbol * | msym
| ) |  |
| static

Definition at line 1337 of file m68hc11-tdep.c.

References flags, MSYMBOL_SET_RTC, and MSYMBOL_SET_RTI.

Referenced by m68hc11_gdbarch_init().

## ◆ m68hc11_extract_return_value()

static void m68hc11_extract_return_value | ( | struct type * | type,
|  | struct regcache * | regcache,
|  | void * | valbuf
| ) |  |
| static

Definition at line 1280 of file m68hc11-tdep.c.

References _, error(), HARD_D_REGNUM, HARD_X_REGNUM, M68HC11_REG_SIZE, regcache_raw_read(), and TYPE_LENGTH.

Referenced by m68hc11_return_value().

## ◆ m68hc11_frame_args_address()

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

Definition at line 960 of file m68hc11-tdep.c.

References m68hc11_unwind_cache::base, m68hc11_frame_unwind_cache(), m68hc11_unwind_cache::return_kind, RETURN_RTC, RETURN_RTI, and m68hc11_unwind_cache::size.

## ◆ m68hc11_frame_base_address()

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

Definition at line 951 of file m68hc11-tdep.c.

References m68hc11_unwind_cache::base, and m68hc11_frame_unwind_cache().

## ◆ m68hc11_frame_prev_register()

static struct value* m68hc11_frame_prev_register | ( | struct frame_info * | this_frame,
|  | void ** | this_prologue_cache,
|  | int | regnum
| ) |  |
| static

Definition at line 902 of file m68hc11-tdep.c.

References frame_unwind_got_constant(), get_frame_arch(), HARD_PAGE_REGNUM, HARD_PC_REGNUM, m68hc11_frame_unwind_cache(), m68hc11_unwind_cache::pc, regnum, release_value(), m68hc11_unwind_cache::return_kind, RETURN_RTC, m68hc11_unwind_cache::saved_regs, trad_frame_get_prev_register(), USE_PAGE_REGISTER, value_as_long(), and value_free().

## ◆ m68hc11_frame_this_id()

static void m68hc11_frame_this_id | ( | struct frame_info * | this_frame,
|  | void ** | this_prologue_cache,
|  | struct frame_id * | this_id
| ) |  |
| static

Definition at line 877 of file m68hc11-tdep.c.

References m68hc11_unwind_cache::base, frame_id_build(), func, get_frame_func(), m68hc11_frame_unwind_cache(), and m68hc11_unwind_cache::prev_sp.

## ◆ m68hc11_frame_unwind_cache()

static struct m68hc11_unwind_cache* m68hc11_frame_unwind_cache | ( | struct frame_info * | this_frame,
|  | void ** | this_prologue_cache
| ) |  |
| static

Definition at line 777 of file m68hc11-tdep.c.

References trad_frame_saved_reg::addr, m68hc11_unwind_cache::base, FRAME_OBSTACK_ZALLOC, gdbarch_num_pseudo_regs(), gdbarch_num_regs(), get_frame_arch(), get_frame_func(), get_frame_pc(), get_frame_register_unsigned(), HARD_CCR_REGNUM, HARD_D_REGNUM, HARD_PAGE_REGNUM, HARD_PC_REGNUM, HARD_SP_REGNUM, HARD_X_REGNUM, HARD_Y_REGNUM, m68hc11_get_return_insn(), m68hc11_scan_prologue(), name, m68hc11_unwind_cache::pc, m68hc11_unwind_cache::prev_sp, m68hc11_unwind_cache::return_kind, RETURN_RTC, RETURN_RTI, m68hc11_unwind_cache::saved_regs, m68hc11_unwind_cache::size, SOFT_FP_REGNUM, soft_regs, m68hc11_unwind_cache::sp_offset, STACK_CORRECTION, trad_frame_addr_p(), trad_frame_alloc_saved_regs(), and trad_frame_set_value().

Referenced by m68hc11_frame_args_address(), m68hc11_frame_base_address(), m68hc11_frame_prev_register(), and m68hc11_frame_this_id().

## ◆ m68hc11_gdbarch_init()

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

Definition at line 1409 of file m68hc11-tdep.c.

References gdbarch_info::abfd, gdbarch_info::bfd_arch_info, core_addr_lessthan(), dwarf2_append_unwinders(), gdbarch_tdep::elf_flags, floatformats_ieee_double, floatformats_ieee_single, frame_base_set_default(), frame_unwind_append_unwinder(), gdbarch_list::gdbarch, gdbarch_alloc(), gdbarch_list_lookup_by_info(), HARD_PC_REGNUM, HARD_SP_REGNUM, m6811_prologue, m6812_prologue, m68hc11_add_reggroups(), m68hc11_dummy_id(), m68hc11_elf_make_msymbol_special(), m68hc11_frame_base, m68hc11_frame_unwind, M68HC11_NUM_PSEUDO_REGS, M68HC11_NUM_REGS, m68hc11_print_registers_info(), m68hc11_pseudo_register_read(), m68hc11_pseudo_register_write(), m68hc11_push_dummy_call(), m68hc11_register_name(), m68hc11_register_reggroup_p(), m68hc11_register_type(), m68hc11_return_value(), m68hc11_skip_prologue(), m68hc11_unwind_pc(), m68hc11_unwind_sp(), M68HC12_HARD_PC_REGNUM, M68HC12_NUM_PSEUDO_REGS, M68HC12_NUM_REGS, gdbarch_list::next, gdbarch_tdep::prologue, set_gdbarch_addr_bit(), set_gdbarch_believe_pcc_promotion(), set_gdbarch_breakpoint_kind_from_pc(), set_gdbarch_char_signed(), set_gdbarch_double_bit(), set_gdbarch_double_format(), set_gdbarch_dummy_id(), set_gdbarch_elf_make_msymbol_special(), set_gdbarch_float_bit(), set_gdbarch_fp0_regnum(), set_gdbarch_inner_than(), set_gdbarch_int_bit(), set_gdbarch_long_bit(), set_gdbarch_long_double_bit(), set_gdbarch_long_long_bit(), set_gdbarch_num_pseudo_regs(), set_gdbarch_num_regs(), set_gdbarch_pc_regnum(), set_gdbarch_print_registers_info(), set_gdbarch_pseudo_register_read(), set_gdbarch_pseudo_register_write(), set_gdbarch_ptr_bit(), set_gdbarch_push_dummy_call(), set_gdbarch_register_name(), set_gdbarch_register_reggroup_p(), set_gdbarch_register_type(), set_gdbarch_return_value(), set_gdbarch_short_bit(), set_gdbarch_skip_prologue(), set_gdbarch_sp_regnum(), set_gdbarch_sw_breakpoint_from_kind(), set_gdbarch_unwind_pc(), set_gdbarch_unwind_sp(), soft_reg_initialized, gdbarch_tdep::stack_correction, gdbarch_tdep::use_page_register, and XCNEW.

Referenced by _initialize_m68hc11_tdep().

## ◆ m68hc11_get_register_info()

static void m68hc11_get_register_info | ( | struct m68hc11_soft_reg * | reg,
|  | const char * | name
| ) |  |
| static

Definition at line 199 of file m68hc11-tdep.c.

References BMSYMBOL_VALUE_ADDRESS, lookup_minimal_symbol(), reg::name, name, soft_max_addr, and soft_min_addr.

Referenced by m68hc11_initialize_register_info().

## ◆ m68hc11_get_return_insn()

static enum insn_return_kind m68hc11_get_return_insn | ( | CORE_ADDR | pc | ) |
| static

Definition at line 580 of file m68hc11-tdep.c.

References lookup_minimal_symbol_by_pc(), MSYMBOL_IS_RTC, MSYMBOL_IS_RTI, RETURN_RTC, RETURN_RTI, and RETURN_RTS.

Referenced by m68hc11_frame_unwind_cache().

## ◆ m68hc11_init_reggroups()

static void m68hc11_init_reggroups | ( | void |  | ) |
| static

Definition at line 1356 of file m68hc11-tdep.c.

References m68hc11_hard_reggroup, m68hc11_soft_reggroup, reggroup_new(), and USER_REGGROUP.

Referenced by _initialize_m68hc11_tdep().

## ◆ m68hc11_initialize_register_info()

static void m68hc11_initialize_register_info | ( | void |  | ) |
| static

Definition at line 225 of file m68hc11-tdep.c.

References _, INT_MAX, M68HC11_ALL_REGS, m68hc11_get_register_info(), M68HC11_MAX_SOFT_REGS, name, m68hc11_soft_reg::name, SOFT_D1_REGNUM, SOFT_FP_REGNUM, soft_max_addr, soft_min_addr, soft_reg_initialized, soft_regs, SOFT_TMP_REGNUM, SOFT_XY_REGNUM, SOFT_Z_REGNUM, SOFT_ZS_REGNUM, warning(), and xsnprintf().

Referenced by m68hc11_pseudo_register_read(), m68hc11_pseudo_register_write(), m68hc11_register_name(), and m68hc11_scan_prologue().

## ◆ m68hc11_print_register()

static void m68hc11_print_register | ( | struct gdbarch * | gdbarch,
|  | struct ui_file * | file,
|  | struct frame_info * | frame,
|  | int | regno
| ) |  |
| static

Definition at line 1008 of file m68hc11-tdep.c.

References fprintf_filtered(), get_frame_register_signed(), get_frame_register_unsigned(), HARD_A_REGNUM, HARD_B_REGNUM, HARD_CCR_REGNUM, HARD_PAGE_REGNUM, HARD_PC_REGNUM, HARD_SP_REGNUM, M68HC12_HARD_PC_REGNUM, print_longest(), and SOFT_FP_REGNUM.

Referenced by m68hc11_print_registers_info().

## ◆ m68hc11_print_registers_info()

static void m68hc11_print_registers_info | ( | struct gdbarch * | gdbarch,
|  | struct ui_file * | file,
|  | struct frame_info * | frame,
|  | int | regno,
|  | int | cpregs
| ) |  |
| static

Definition at line 1092 of file m68hc11-tdep.c.

References fprintf_filtered(), gdbarch_register_name(), HARD_CCR_REGNUM, HARD_D_REGNUM, HARD_PAGE_REGNUM, HARD_PC_REGNUM, HARD_SP_REGNUM, HARD_X_REGNUM, HARD_Y_REGNUM, M68HC11_ALL_REGS, m68hc11_print_register(), name, SOFT_D1_REGNUM, SOFT_FP_REGNUM, and soft_regs.

Referenced by m68hc11_gdbarch_init().

## ◆ m68hc11_pseudo_register_read()

static enum register_status m68hc11_pseudo_register_read | ( | struct gdbarch * | gdbarch,
|  | struct regcache * | regcache,
|  | int | regno,
|  | gdb_byte * | buf
| ) |  |
| static

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

References gdbarch_byte_order(), HARD_PAGE_REGNUM, HARD_PC_REGNUM, m68hc11_initialize_register_info(), M68HC12_HARD_PC_REGNUM, memset(), name, REG_VALID, regcache_cooked_read_unsigned(), soft_regs, status, store_unsigned_integer(), and target_read_memory().

Referenced by m68hc11_gdbarch_init().

## ◆ m68hc11_pseudo_register_write()

static void m68hc11_pseudo_register_write | ( | struct gdbarch * | gdbarch,
|  | struct regcache * | regcache,
|  | int | regno,
|  | const gdb_byte * | buf
| ) |  |
| static

Definition at line 329 of file m68hc11-tdep.c.

References extract_unsigned_integer(), gdbarch_byte_order(), HARD_PAGE_REGNUM, HARD_PC_REGNUM, m68hc11_initialize_register_info(), M68HC12_HARD_PC_REGNUM, name, regcache_cooked_write_unsigned(), soft_regs, and target_write_memory().

Referenced by m68hc11_gdbarch_init().

## ◆ m68hc11_push_dummy_call()

static CORE_ADDR m68hc11_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 1159 of file m68hc11-tdep.c.

References extract_unsigned_integer(), gdbarch_byte_order(), HARD_D_REGNUM, HARD_SP_REGNUM, HARD_X_REGNUM, regcache_cooked_write_unsigned(), SOFT_FP_REGNUM, STACK_CORRECTION, store_unsigned_integer(), type, TYPE_LENGTH, value_contents(), value_type(), and write_memory().

Referenced by m68hc11_gdbarch_init().

## ◆ m68hc11_register_name()

static const char* m68hc11_register_name | ( | struct gdbarch * | gdbarch,
|  | int | reg_nr
| ) |  |
| static

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

References HARD_PC_REGNUM, M68HC11_ALL_REGS, m68hc11_initialize_register_info(), M68HC11_LAST_HARD_REG, m68hc11_register_names, M68HC12_HARD_PC_REGNUM, name, soft_regs, and USE_PAGE_REGISTER.

Referenced by m68hc11_gdbarch_init(), and m68hc11_register_reggroup_p().

## ◆ m68hc11_register_reggroup_p()

static int m68hc11_register_reggroup_p | ( | struct gdbarch * | gdbarch,
|  | int | regnum,
|  | struct reggroup * | group
| ) |  |
| static

Definition at line 1377 of file m68hc11-tdep.c.

References default_register_reggroup_p(), gdbarch_num_regs(), HARD_CCR_REGNUM, HARD_D_REGNUM, HARD_PC_REGNUM, HARD_SP_REGNUM, HARD_X_REGNUM, HARD_Y_REGNUM, m68hc11_hard_reggroup, m68hc11_register_name(), m68hc11_soft_reggroup, regnum, restore_reggroup, save_reggroup, SOFT_D1_REGNUM, SOFT_FP_REGNUM, SOFT_TMP_REGNUM, SOFT_XY_REGNUM, and SOFT_ZS_REGNUM.

Referenced by m68hc11_gdbarch_init().

## ◆ m68hc11_register_type()

static struct type* m68hc11_register_type | ( | struct gdbarch * | gdbarch,
|  | int | reg_nr
| ) |  |
| static

Definition at line 1236 of file m68hc11-tdep.c.

References builtin_type(), builtin_type::builtin_uint16, builtin_type::builtin_uint32, builtin_type::builtin_uint8, HARD_A_REGNUM, HARD_B_REGNUM, HARD_CCR_REGNUM, HARD_PAGE_REGNUM, and M68HC12_HARD_PC_REGNUM.

Referenced by m68hc11_gdbarch_init().

## ◆ m68hc11_return_value()

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

Definition at line 1314 of file m68hc11-tdep.c.

References m68hc11_extract_return_value(), m68hc11_store_return_value(), RETURN_VALUE_REGISTER_CONVENTION, RETURN_VALUE_STRUCT_CONVENTION, TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_STRUCT, TYPE_CODE_UNION, and TYPE_LENGTH.

Referenced by m68hc11_gdbarch_init().

## ◆ m68hc11_scan_prologue()

static CORE_ADDR m68hc11_scan_prologue | ( | struct gdbarch * | gdbarch,
|  | CORE_ADDR | pc,
|  | CORE_ADDR | current_pc,
|  | struct m68hc11_unwind_cache * | info
| ) |  |
| static

Definition at line 605 of file m68hc11-tdep.c.

References trad_frame_saved_reg::addr, gdbarch_tdep(), insn_sequence::length, m68hc11_analyze_instruction(), m68hc11_initialize_register_info(), m68hc11_which_soft_register(), gdbarch_tdep::prologue, m68hc11_unwind_cache::saved_regs, m68hc11_unwind_cache::size, size, m68hc11_unwind_cache::sp_offset, and insn_sequence::type.

Referenced by m68hc11_frame_unwind_cache(), and m68hc11_skip_prologue().

## ◆ m68hc11_skip_prologue()

static CORE_ADDR m68hc11_skip_prologue | ( | struct gdbarch * | gdbarch,
|  | CORE_ADDR | pc
| ) |  |
| static

Definition at line 740 of file m68hc11-tdep.c.

References symtab_and_line::end, find_pc_line(), find_pc_partial_function(), m68hc11_scan_prologue(), and m68hc11_unwind_cache::pc.

Referenced by m68hc11_gdbarch_init().

## ◆ m68hc11_store_return_value()

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

Definition at line 1255 of file m68hc11-tdep.c.

References _, error(), HARD_D_REGNUM, HARD_X_REGNUM, regcache_raw_write(), regcache_raw_write_part(), and TYPE_LENGTH.

Referenced by m68hc11_return_value().

## ◆ m68hc11_unwind_pc()

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

Definition at line 761 of file m68hc11-tdep.c.

References frame_unwind_register_unsigned(), gdbarch_pc_regnum(), and m68hc11_unwind_cache::pc.

Referenced by m68hc11_gdbarch_init().

## ◆ m68hc11_unwind_sp()

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

Definition at line 983 of file m68hc11-tdep.c.

References frame_unwind_register_unsigned(), and HARD_SP_REGNUM.

Referenced by m68hc11_gdbarch_init().

## ◆ m68hc11_which_soft_register()

static int m68hc11_which_soft_register | ( | CORE_ADDR | addr | ) |
| static

Definition at line 262 of file m68hc11-tdep.c.

References M68HC11_ALL_REGS, name, SOFT_FP_REGNUM, soft_max_addr, and soft_regs.

Referenced by m68hc11_scan_prologue().

## Variable Documentation

## ◆ m6811_prologue

struct insn_sequence m6811_prologue[]
| static

Definition at line 449 of file m68hc11-tdep.c.

Referenced by m68hc11_gdbarch_init().

## ◆ m6812_prologue

struct insn_sequence m6812_prologue[]
| static

Initial value:
= {
{ P_SAVE_REG, 5, { M6812_OP_PAGE2, M6812_OP_MOVW, M6812_PB_PSHW,
OP_IMM_HIGH, OP_IMM_LOW } },
{ P_SET_FRAME, 2, { M6812_OP_STS, OP_DIRECT } },
{ P_SET_FRAME, 3, { M6812_OP_STS_EXT, OP_IMM_HIGH, OP_IMM_LOW } },
{ P_LOCAL_N, 2, { M6812_OP_LEAS, OP_PBYTE } },
{ P_LOCAL_2, 1, { M6812_OP_PSHX } },
{ P_LOCAL_2, 1, { M6812_OP_PSHY } },
{ P_LAST, 0 }
}
M6812_OP_STS
#define M6812_OP_STS
OP_IMM_HIGH
#define OP_IMM_HIGH
M6812_OP_PSHX
#define M6812_OP_PSHX
OP_PBYTE
#define OP_PBYTE
M6812_OP_PSHY
#define M6812_OP_PSHY
M6812_OP_STS_EXT
#define M6812_OP_STS_EXT
OP_DIRECT
#define OP_DIRECT
M6812_PB_PSHW
#define M6812_PB_PSHW
M6812_OP_MOVW
#define M6812_OP_MOVW
M6812_OP_LEAS
#define M6812_OP_LEAS
M6812_OP_PAGE2
#define M6812_OP_PAGE2
OP_IMM_LOW
#define OP_IMM_LOW

Definition at line 483 of file m68hc11-tdep.c.

Referenced by m68hc11_gdbarch_init().

## ◆ m68hc11_break_insn

constexpr gdb_byte m68hc11_break_insn[] = {0x0}

Definition at line 393 of file m68hc11-tdep.c.

## ◆ m68hc11_frame_base

const struct frame_base m68hc11_frame_base
| static

Initial value:
= {
&m68hc11_frame_unwind,
m68hc11_frame_base_address,
m68hc11_frame_base_address,
m68hc11_frame_args_address
}
m68hc11_frame_unwind
static const struct frame_unwind m68hc11_frame_unwind
Definition: m68hc11-tdep.c:941
m68hc11_frame_args_address
static CORE_ADDR m68hc11_frame_args_address(struct frame_info *this_frame, void **this_cache)
Definition: m68hc11-tdep.c:960
m68hc11_frame_base_address
static CORE_ADDR m68hc11_frame_base_address(struct frame_info *this_frame, void **this_cache)
Definition: m68hc11-tdep.c:951

Definition at line 975 of file m68hc11-tdep.c.

Referenced by m68hc11_gdbarch_init().

## ◆ m68hc11_frame_unwind

const struct frame_unwind m68hc11_frame_unwind
| static

Initial value:
= {
NORMAL_FRAME,
default_frame_unwind_stop_reason,
m68hc11_frame_this_id,
m68hc11_frame_prev_register,
NULL,
default_frame_sniffer
}
m68hc11_frame_this_id
static void m68hc11_frame_this_id(struct frame_info *this_frame, void **this_prologue_cache, struct frame_id *this_id)
Definition: m68hc11-tdep.c:877
NORMAL_FRAME
Definition: frame.h:244
m68hc11_frame_prev_register
static struct value * m68hc11_frame_prev_register(struct frame_info *this_frame, void **this_prologue_cache, int regnum)
Definition: m68hc11-tdep.c:902
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 941 of file m68hc11-tdep.c.

Referenced by m68hc11_gdbarch_init().

## ◆ m68hc11_hard_reggroup

struct reggroup* m68hc11_hard_reggroup
| static

Definition at line 1353 of file m68hc11-tdep.c.

Referenced by m68hc11_add_reggroups(), m68hc11_init_reggroups(), and m68hc11_register_reggroup_p().

## ◆ m68hc11_register_names

const char* m68hc11_register_names[]
| static

Initial value:
=
{
"x", "d", "y", "sp", "pc", "a", "b",
"ccr", "page", "frame","tmp", "zs", "xy", 0,
"d1", "d2", "d3", "d4", "d5", "d6", "d7",
"d8", "d9", "d10", "d11", "d12", "d13", "d14",
"d15", "d16", "d17", "d18", "d19", "d20", "d21",
"d22", "d23", "d24", "d25", "d26", "d27", "d28",
"d29", "d30", "d31", "d32"
}

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

Referenced by m68hc11_register_name().

## ◆ m68hc11_soft_reggroup

struct reggroup* m68hc11_soft_reggroup
| static

Definition at line 1352 of file m68hc11-tdep.c.

Referenced by m68hc11_add_reggroups(), m68hc11_init_reggroups(), and m68hc11_register_reggroup_p().

## ◆ soft_max_addr

int soft_max_addr
| static

Definition at line 192 of file m68hc11-tdep.c.

Referenced by m68hc11_get_register_info(), m68hc11_initialize_register_info(), and m68hc11_which_soft_register().

## ◆ soft_min_addr

int soft_min_addr
| static

Definition at line 191 of file m68hc11-tdep.c.

Referenced by m68hc11_get_register_info(), and m68hc11_initialize_register_info().

## ◆ soft_reg_initialized

int soft_reg_initialized = 0
| static

Definition at line 193 of file m68hc11-tdep.c.

Referenced by m68hc11_gdbarch_init(), and m68hc11_initialize_register_info().

## ◆ soft_regs

struct m68hc11_soft_reg soft_regs[M68HC11_ALL_REGS]
| static

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

Referenced by m68hc11_frame_unwind_cache(), m68hc11_initialize_register_info(), m68hc11_print_registers_info(), m68hc11_pseudo_register_read(), m68hc11_pseudo_register_write(), m68hc11_register_name(), and m68hc11_which_soft_register().