mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2025-01-21 00:15:13 +00:00
* m68k-tdep.c (m68k_ps_type): New.
(m68k_init_types): New. (m68k_register_type): Use m68k_ps_type for PS register. (_initialize_m68k_tdep): Call m68k_init_types.
This commit is contained in:
parent
4ed7793328
commit
4713453b1e
@ -1,5 +1,10 @@
|
||||
2007-06-30 Andreas Schwab <schwab@suse.de>
|
||||
|
||||
* m68k-tdep.c (m68k_ps_type): New.
|
||||
(m68k_init_types): New.
|
||||
(m68k_register_type): Use m68k_ps_type for PS register.
|
||||
(_initialize_m68k_tdep): Call m68k_init_types.
|
||||
|
||||
* m68k-tdep.c (m68k_gdbarch_init): Don't infer coldfire flavour
|
||||
from the generic m68k arch.
|
||||
|
||||
|
@ -69,6 +69,32 @@ m68k_local_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
|
||||
*lenptr = sizeof (break_insn);
|
||||
return break_insn;
|
||||
}
|
||||
|
||||
|
||||
/* Type for %ps. */
|
||||
struct type *m68k_ps_type;
|
||||
|
||||
/* Construct types for ISA-specific registers. */
|
||||
static void
|
||||
m68k_init_types (void)
|
||||
{
|
||||
struct type *type;
|
||||
|
||||
type = init_flags_type ("builtin_type_m68k_ps", 4);
|
||||
append_flags_type_flag (type, 0, "C");
|
||||
append_flags_type_flag (type, 1, "V");
|
||||
append_flags_type_flag (type, 2, "Z");
|
||||
append_flags_type_flag (type, 3, "N");
|
||||
append_flags_type_flag (type, 4, "X");
|
||||
append_flags_type_flag (type, 8, "I0");
|
||||
append_flags_type_flag (type, 9, "I1");
|
||||
append_flags_type_flag (type, 10, "I2");
|
||||
append_flags_type_flag (type, 12, "M");
|
||||
append_flags_type_flag (type, 13, "S");
|
||||
append_flags_type_flag (type, 14, "T0");
|
||||
append_flags_type_flag (type, 15, "T1");
|
||||
m68k_ps_type = type;
|
||||
}
|
||||
|
||||
/* Return the GDB type object for the "standard" data type of data in
|
||||
register N. This should be int for D0-D7, SR, FPCONTROL and
|
||||
@ -112,6 +138,9 @@ m68k_register_type (struct gdbarch *gdbarch, int regnum)
|
||||
if (regnum >= M68K_A0_REGNUM && regnum <= M68K_A0_REGNUM + 7)
|
||||
return builtin_type_void_data_ptr;
|
||||
|
||||
if (regnum == M68K_PS_REGNUM)
|
||||
return m68k_ps_type;
|
||||
|
||||
return builtin_type_int32;
|
||||
}
|
||||
|
||||
@ -1249,4 +1278,7 @@ void
|
||||
_initialize_m68k_tdep (void)
|
||||
{
|
||||
gdbarch_register (bfd_arch_m68k, m68k_gdbarch_init, m68k_dump_tdep);
|
||||
|
||||
/* Initialize the m68k-specific register types. */
|
||||
m68k_init_types ();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user