1 /* Target-dependent code for MItsubishi D10V, for GDB.
2 Copyright (C) 1996 Free Software Foundation, Inc.
3 This file is part of GDB.
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12 You should have received a copy of the GNU General Public License
13 along with this program; if not, write to the Free Software
14 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
16 /* Contributed by Martin Hunt, hunt@cygnus.com */
35 d10v_skip_prologue (start_pc
)
41 d10v_frame_chain (frame
)
42 struct frame_info
*frame
;
44 if (!inside_entry_file (frame
->pc
))
45 return read_memory_integer (FRAME_FP (frame
) + frame
->f_offset
, 4);
50 /* Put here the code to store, into a struct frame_saved_regs, the
51 addresses of the saved registers of frame described by FRAME_INFO.
52 This includes special registers such as pc and fp saved in special
53 ways in the stack frame. sp is even more special: the address we
54 return for it IS the sp for the next frame. */
56 d10v_frame_find_saved_regs (fi
, fsr
)
57 struct frame_info
*fi
;
58 struct frame_saved_regs
*fsr
;
63 d10v_init_extra_frame_info (fromleaf
, fi
)
65 struct frame_info
*fi
;
67 struct frame_saved_regs dummy
;
69 fi
->pc
= fi
->next
->return_pc
;
70 d10v_frame_find_saved_regs (fi
, &dummy
);
74 show_regs (args
, from_tty
)
79 printf_filtered ("PC=%04x (0x%x) PSW=%04x RPT_S=%04x RPT_E=%04x RPT_C=%04x\n",
80 read_register (PC_REGNUM
), read_register (PC_REGNUM
) << 2,
81 read_register (PSW_REGNUM
),
85 printf_filtered ("R0-R7 %04x %04x %04x %04x %04x %04x %04x %04x\n",
94 printf_filtered ("R8-R15 %04x %04x %04x %04x %04x %04x %04x %04x\n",
103 read_register_gen (A0_REGNUM
, (char *)&num1
);
104 read_register_gen (A0_REGNUM
+1, (char *)&num2
);
105 printf_filtered ("A0-A1 %010llx %010llx\n",num1
, num2
);
109 _initialize_d10v_tdep ()
111 struct cmd_list_element
*c
;
112 tm_print_insn
= print_insn_d10v
;
113 add_com ("regs", class_vars
, show_regs
, "Print all registers");
117 d10v_read_register_pid (regno
, pid
)
123 if (pid
== inferior_pid
)
124 return (read_register(regno
)) << 2;
126 save_pid
= inferior_pid
;
128 retval
= read_register (regno
);
129 inferior_pid
= save_pid
;
130 return (retval
<< 2);
134 d10v_write_register_pid (regno
, val
, pid
)
143 if (pid
== inferior_pid
)
145 write_register (regno
, val
);
149 save_pid
= inferior_pid
;
151 write_register (regno
, val
);
152 inferior_pid
= save_pid
;
This page took 0.03363 seconds and 4 git commands to generate.