1 /* Target-dependent code for the Matsushita MN10300 for GDB, the GNU debugger.
3 Copyright (C) 2003-2014 Free Software Foundation, Inc.
5 This file is part of GDB.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
23 #include "mn10300-tdep.h"
28 #include "solib-svr4.h"
30 #include "trad-frame.h"
31 #include "tramp-frame.h"
32 #include "linux-tdep.h"
34 /* Transliterated from <asm-mn10300/elf.h>... */
35 #define MN10300_ELF_NGREG 28
36 #define MN10300_ELF_NFPREG 32
38 typedef gdb_byte mn10300_elf_greg_t[4];
39 typedef mn10300_elf_greg_t mn10300_elf_gregset_t[MN10300_ELF_NGREG];
41 typedef gdb_byte mn10300_elf_fpreg_t[4];
44 mn10300_elf_fpreg_t fpregs[MN10300_ELF_NFPREG];
46 } mn10300_elf_fpregset_t;
48 /* elf_gregset_t register indices stolen from include/asm-mn10300/ptrace.h. */
49 #define MN10300_ELF_GREGSET_T_REG_INDEX_A3 0
50 #define MN10300_ELF_GREGSET_T_REG_INDEX_A2 1
51 #define MN10300_ELF_GREGSET_T_REG_INDEX_D3 2
52 #define MN10300_ELF_GREGSET_T_REG_INDEX_D2 3
53 #define MN10300_ELF_GREGSET_T_REG_INDEX_MCVF 4
54 #define MN10300_ELF_GREGSET_T_REG_INDEX_MCRL 5
55 #define MN10300_ELF_GREGSET_T_REG_INDEX_MCRH 6
56 #define MN10300_ELF_GREGSET_T_REG_INDEX_MDRQ 7
57 #define MN10300_ELF_GREGSET_T_REG_INDEX_E1 8
58 #define MN10300_ELF_GREGSET_T_REG_INDEX_E0 9
59 #define MN10300_ELF_GREGSET_T_REG_INDEX_E7 10
60 #define MN10300_ELF_GREGSET_T_REG_INDEX_E6 11
61 #define MN10300_ELF_GREGSET_T_REG_INDEX_E5 12
62 #define MN10300_ELF_GREGSET_T_REG_INDEX_E4 13
63 #define MN10300_ELF_GREGSET_T_REG_INDEX_E3 14
64 #define MN10300_ELF_GREGSET_T_REG_INDEX_E2 15
65 #define MN10300_ELF_GREGSET_T_REG_INDEX_SP 16
66 #define MN10300_ELF_GREGSET_T_REG_INDEX_LAR 17
67 #define MN10300_ELF_GREGSET_T_REG_INDEX_LIR 18
68 #define MN10300_ELF_GREGSET_T_REG_INDEX_MDR 19
69 #define MN10300_ELF_GREGSET_T_REG_INDEX_A1 20
70 #define MN10300_ELF_GREGSET_T_REG_INDEX_A0 21
71 #define MN10300_ELF_GREGSET_T_REG_INDEX_D1 22
72 #define MN10300_ELF_GREGSET_T_REG_INDEX_D0 23
73 #define MN10300_ELF_GREGSET_T_REG_INDEX_ORIG_D0 24
74 #define MN10300_ELF_GREGSET_T_REG_INDEX_EPSW 25
75 #define MN10300_ELF_GREGSET_T_REG_INDEX_PC 26
77 /* New gdbarch API for corefile registers.
78 Given a section name and size, create a struct reg object
79 with a supply_register and a collect_register method. */
81 /* Copy register value of REGNUM from regset to regcache.
82 If REGNUM is -1, do this for all gp registers in regset. */
85 am33_supply_gregset_method (const struct regset *regset,
86 struct regcache *regcache,
87 int regnum, const void *gregs, size_t len)
89 char zerobuf[MAX_REGISTER_SIZE];
90 const mn10300_elf_greg_t *regp = (const mn10300_elf_greg_t *) gregs;
93 gdb_assert (len == sizeof (mn10300_elf_gregset_t));
97 regcache_raw_supply (regcache, E_D0_REGNUM,
98 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_D0));
101 regcache_raw_supply (regcache, E_D1_REGNUM,
102 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_D1));
105 regcache_raw_supply (regcache, E_D2_REGNUM,
106 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_D2));
109 regcache_raw_supply (regcache, E_D3_REGNUM,
110 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_D3));
113 regcache_raw_supply (regcache, E_A0_REGNUM,
114 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_A0));
117 regcache_raw_supply (regcache, E_A1_REGNUM,
118 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_A1));
121 regcache_raw_supply (regcache, E_A2_REGNUM,
122 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_A2));
125 regcache_raw_supply (regcache, E_A3_REGNUM,
126 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_A3));
129 regcache_raw_supply (regcache, E_SP_REGNUM,
130 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_SP));
133 regcache_raw_supply (regcache, E_PC_REGNUM,
134 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_PC));
137 regcache_raw_supply (regcache, E_MDR_REGNUM,
138 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MDR));
141 regcache_raw_supply (regcache, E_PSW_REGNUM,
142 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_EPSW));
145 regcache_raw_supply (regcache, E_LIR_REGNUM,
146 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_LIR));
149 regcache_raw_supply (regcache, E_LAR_REGNUM,
150 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_LAR));
153 regcache_raw_supply (regcache, E_MDRQ_REGNUM,
154 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MDRQ));
157 regcache_raw_supply (regcache, E_E0_REGNUM,
158 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E0));
161 regcache_raw_supply (regcache, E_E1_REGNUM,
162 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E1));
165 regcache_raw_supply (regcache, E_E2_REGNUM,
166 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E2));
169 regcache_raw_supply (regcache, E_E3_REGNUM,
170 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E3));
173 regcache_raw_supply (regcache, E_E4_REGNUM,
174 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E4));
177 regcache_raw_supply (regcache, E_E5_REGNUM,
178 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E5));
181 regcache_raw_supply (regcache, E_E6_REGNUM,
182 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E6));
185 regcache_raw_supply (regcache, E_E7_REGNUM,
186 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E7));
189 /* ssp, msp, and usp are inaccessible. */
191 memset (zerobuf, 0, MAX_REGISTER_SIZE);
192 regcache_raw_supply (regcache, E_E8_REGNUM, zerobuf);
195 memset (zerobuf, 0, MAX_REGISTER_SIZE);
196 regcache_raw_supply (regcache, E_E9_REGNUM, zerobuf);
199 memset (zerobuf, 0, MAX_REGISTER_SIZE);
200 regcache_raw_supply (regcache, E_E10_REGNUM, zerobuf);
204 regcache_raw_supply (regcache, E_MCRH_REGNUM,
205 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MCRH));
208 regcache_raw_supply (regcache, E_MCRL_REGNUM,
209 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MCRL));
212 regcache_raw_supply (regcache, E_MCVF_REGNUM,
213 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MCVF));
216 /* FPCR is numbered among the GP regs, but handled as an FP reg.
219 case E_FPCR_REGNUM + 1:
220 /* The two unused registers beyond fpcr are inaccessible. */
221 memset (zerobuf, 0, MAX_REGISTER_SIZE);
222 regcache_raw_supply (regcache, E_FPCR_REGNUM + 1, zerobuf);
224 case E_FPCR_REGNUM + 2:
225 memset (zerobuf, 0, MAX_REGISTER_SIZE);
226 regcache_raw_supply (regcache, E_FPCR_REGNUM + 2, zerobuf);
228 default: /* An error, obviously, but should we error out? */
231 for (i = 0; i < MN10300_ELF_NGREG; i++)
232 am33_supply_gregset_method (regset, regcache, i, gregs, len);
238 /* Copy fp register value of REGNUM from regset to regcache.
239 If REGNUM is -1, do this for all fp registers in regset. */
242 am33_supply_fpregset_method (const struct regset *regset,
243 struct regcache *regcache,
244 int regnum, const void *fpregs, size_t len)
246 const mn10300_elf_fpregset_t *fpregset = fpregs;
248 gdb_assert (len == sizeof (mn10300_elf_fpregset_t));
254 for (i = 0; i < MN10300_ELF_NFPREG; i++)
255 am33_supply_fpregset_method (regset, regcache,
256 E_FS0_REGNUM + i, fpregs, len);
257 am33_supply_fpregset_method (regset, regcache,
258 E_FPCR_REGNUM, fpregs, len);
260 else if (regnum == E_FPCR_REGNUM)
261 regcache_raw_supply (regcache, E_FPCR_REGNUM,
263 else if (E_FS0_REGNUM <= regnum
264 && regnum < E_FS0_REGNUM + MN10300_ELF_NFPREG)
265 regcache_raw_supply (regcache, regnum,
266 &fpregset->fpregs[regnum - E_FS0_REGNUM]);
271 /* Copy register values from regcache to regset. */
274 am33_collect_gregset_method (const struct regset *regset,
275 const struct regcache *regcache,
276 int regnum, void *gregs, size_t len)
278 mn10300_elf_gregset_t *regp = gregs;
281 gdb_assert (len == sizeof (mn10300_elf_gregset_t));
285 regcache_raw_collect (regcache, E_D0_REGNUM,
286 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_D0));
289 regcache_raw_collect (regcache, E_D1_REGNUM,
290 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_D1));
293 regcache_raw_collect (regcache, E_D2_REGNUM,
294 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_D2));
297 regcache_raw_collect (regcache, E_D3_REGNUM,
298 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_D3));
301 regcache_raw_collect (regcache, E_A0_REGNUM,
302 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_A0));
305 regcache_raw_collect (regcache, E_A1_REGNUM,
306 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_A1));
309 regcache_raw_collect (regcache, E_A2_REGNUM,
310 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_A2));
313 regcache_raw_collect (regcache, E_A3_REGNUM,
314 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_A3));
317 regcache_raw_collect (regcache, E_SP_REGNUM,
318 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_SP));
321 regcache_raw_collect (regcache, E_PC_REGNUM,
322 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_PC));
325 regcache_raw_collect (regcache, E_MDR_REGNUM,
326 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MDR));
329 regcache_raw_collect (regcache, E_PSW_REGNUM,
330 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_EPSW));
333 regcache_raw_collect (regcache, E_LIR_REGNUM,
334 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_LIR));
337 regcache_raw_collect (regcache, E_LAR_REGNUM,
338 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_LAR));
341 regcache_raw_collect (regcache, E_MDRQ_REGNUM,
342 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MDRQ));
345 regcache_raw_collect (regcache, E_E0_REGNUM,
346 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E0));
349 regcache_raw_collect (regcache, E_E1_REGNUM,
350 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E1));
353 regcache_raw_collect (regcache, E_E2_REGNUM,
354 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E2));
357 regcache_raw_collect (regcache, E_E3_REGNUM,
358 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E3));
361 regcache_raw_collect (regcache, E_E4_REGNUM,
362 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E4));
365 regcache_raw_collect (regcache, E_E5_REGNUM,
366 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E5));
369 regcache_raw_collect (regcache, E_E6_REGNUM,
370 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E6));
373 regcache_raw_collect (regcache, E_E7_REGNUM,
374 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_E7));
377 /* ssp, msp, and usp are inaccessible. */
379 /* The gregset struct has noplace to put this: do nothing. */
382 /* The gregset struct has noplace to put this: do nothing. */
385 /* The gregset struct has noplace to put this: do nothing. */
388 regcache_raw_collect (regcache, E_MCRH_REGNUM,
389 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MCRH));
392 regcache_raw_collect (regcache, E_MCRL_REGNUM,
393 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MCRL));
396 regcache_raw_collect (regcache, E_MCVF_REGNUM,
397 (regp + MN10300_ELF_GREGSET_T_REG_INDEX_MCVF));
400 /* FPCR is numbered among the GP regs, but handled as an FP reg.
403 case E_FPCR_REGNUM + 1:
404 /* The gregset struct has noplace to put this: do nothing. */
406 case E_FPCR_REGNUM + 2:
407 /* The gregset struct has noplace to put this: do nothing. */
409 default: /* An error, obviously, but should we error out? */
412 for (i = 0; i < MN10300_ELF_NGREG; i++)
413 am33_collect_gregset_method (regset, regcache, i, gregs, len);
419 /* Copy fp register values from regcache to regset. */
422 am33_collect_fpregset_method (const struct regset *regset,
423 const struct regcache *regcache,
424 int regnum, void *fpregs, size_t len)
426 mn10300_elf_fpregset_t *fpregset = fpregs;
428 gdb_assert (len == sizeof (mn10300_elf_fpregset_t));
433 for (i = 0; i < MN10300_ELF_NFPREG; i++)
434 am33_collect_fpregset_method (regset, regcache, E_FS0_REGNUM + i,
436 am33_collect_fpregset_method (regset, regcache,
437 E_FPCR_REGNUM, fpregs, len);
439 else if (regnum == E_FPCR_REGNUM)
440 regcache_raw_collect (regcache, E_FPCR_REGNUM,
442 else if (E_FS0_REGNUM <= regnum
443 && regnum < E_FS0_REGNUM + MN10300_ELF_NFPREG)
444 regcache_raw_collect (regcache, regnum,
445 &fpregset->fpregs[regnum - E_FS0_REGNUM]);
450 static const struct regset am33_gregset =
452 NULL, am33_supply_gregset_method, am33_collect_gregset_method
455 static const struct regset am33_fpregset =
457 NULL, am33_supply_fpregset_method, am33_collect_fpregset_method
460 /* Iterate over core file register note sections. */
463 am33_iterate_over_regset_sections (struct gdbarch *gdbarch,
464 iterate_over_regset_sections_cb *cb,
466 const struct regcache *regcache)
468 cb (".reg", sizeof (mn10300_elf_gregset_t), &am33_gregset,
470 cb (".reg2", sizeof(mn10300_elf_fpregset_t), &am33_fpregset,
475 am33_linux_sigframe_cache_init (const struct tramp_frame *self,
476 struct frame_info *this_frame,
477 struct trad_frame_cache *this_cache,
480 static const struct tramp_frame am33_linux_sigframe = {
491 { TRAMP_SENTINEL_INSN, -1 }
493 am33_linux_sigframe_cache_init
496 static const struct tramp_frame am33_linux_rt_sigframe = {
507 { TRAMP_SENTINEL_INSN, -1 }
509 am33_linux_sigframe_cache_init
512 /* Relevant struct definitions for signal handling...
514 From arch/mn10300/kernel/sigframe.h:
518 void (*pretcode)(void);
520 struct sigcontext *psc;
521 struct sigcontext sc;
522 struct fpucontext fpuctx;
523 unsigned long extramask[_NSIG_WORDS-1];
529 void (*pretcode)(void);
531 struct siginfo *pinfo;
535 struct fpucontext fpuctx;
539 From include/asm-mn10300/ucontext.h:
542 unsigned long uc_flags;
543 struct ucontext *uc_link;
545 struct sigcontext uc_mcontext;
549 From include/asm-mn10300/sigcontext.h:
552 unsigned long fs[32];
583 struct fpucontext *fpucontext;
584 unsigned long oldmask;
588 #define AM33_SIGCONTEXT_D0 0
589 #define AM33_SIGCONTEXT_D1 4
590 #define AM33_SIGCONTEXT_D2 8
591 #define AM33_SIGCONTEXT_D3 12
592 #define AM33_SIGCONTEXT_A0 16
593 #define AM33_SIGCONTEXT_A1 20
594 #define AM33_SIGCONTEXT_A2 24
595 #define AM33_SIGCONTEXT_A3 28
596 #define AM33_SIGCONTEXT_E0 32
597 #define AM33_SIGCONTEXT_E1 36
598 #define AM33_SIGCONTEXT_E2 40
599 #define AM33_SIGCONTEXT_E3 44
600 #define AM33_SIGCONTEXT_E4 48
601 #define AM33_SIGCONTEXT_E5 52
602 #define AM33_SIGCONTEXT_E6 56
603 #define AM33_SIGCONTEXT_E7 60
604 #define AM33_SIGCONTEXT_LAR 64
605 #define AM33_SIGCONTEXT_LIR 68
606 #define AM33_SIGCONTEXT_MDR 72
607 #define AM33_SIGCONTEXT_MCVF 76
608 #define AM33_SIGCONTEXT_MCRL 80
609 #define AM33_SIGCONTEXT_MCRH 84
610 #define AM33_SIGCONTEXT_MDRQ 88
611 #define AM33_SIGCONTEXT_SP 92
612 #define AM33_SIGCONTEXT_EPSW 96
613 #define AM33_SIGCONTEXT_PC 100
614 #define AM33_SIGCONTEXT_FPUCONTEXT 104
618 am33_linux_sigframe_cache_init (const struct tramp_frame *self,
619 struct frame_info *this_frame,
620 struct trad_frame_cache *this_cache,
623 CORE_ADDR sc_base, fpubase;
626 sc_base = get_frame_register_unsigned (this_frame, E_SP_REGNUM);
627 if (self == &am33_linux_sigframe)
630 sc_base = get_frame_memory_unsigned (this_frame, sc_base, 4);
635 sc_base = get_frame_memory_unsigned (this_frame, sc_base, 4);
639 trad_frame_set_reg_addr (this_cache, E_D0_REGNUM,
640 sc_base + AM33_SIGCONTEXT_D0);
641 trad_frame_set_reg_addr (this_cache, E_D1_REGNUM,
642 sc_base + AM33_SIGCONTEXT_D1);
643 trad_frame_set_reg_addr (this_cache, E_D2_REGNUM,
644 sc_base + AM33_SIGCONTEXT_D2);
645 trad_frame_set_reg_addr (this_cache, E_D3_REGNUM,
646 sc_base + AM33_SIGCONTEXT_D3);
648 trad_frame_set_reg_addr (this_cache, E_A0_REGNUM,
649 sc_base + AM33_SIGCONTEXT_A0);
650 trad_frame_set_reg_addr (this_cache, E_A1_REGNUM,
651 sc_base + AM33_SIGCONTEXT_A1);
652 trad_frame_set_reg_addr (this_cache, E_A2_REGNUM,
653 sc_base + AM33_SIGCONTEXT_A2);
654 trad_frame_set_reg_addr (this_cache, E_A3_REGNUM,
655 sc_base + AM33_SIGCONTEXT_A3);
657 trad_frame_set_reg_addr (this_cache, E_E0_REGNUM,
658 sc_base + AM33_SIGCONTEXT_E0);
659 trad_frame_set_reg_addr (this_cache, E_E1_REGNUM,
660 sc_base + AM33_SIGCONTEXT_E1);
661 trad_frame_set_reg_addr (this_cache, E_E2_REGNUM,
662 sc_base + AM33_SIGCONTEXT_E2);
663 trad_frame_set_reg_addr (this_cache, E_E3_REGNUM,
664 sc_base + AM33_SIGCONTEXT_E3);
665 trad_frame_set_reg_addr (this_cache, E_E4_REGNUM,
666 sc_base + AM33_SIGCONTEXT_E4);
667 trad_frame_set_reg_addr (this_cache, E_E5_REGNUM,
668 sc_base + AM33_SIGCONTEXT_E5);
669 trad_frame_set_reg_addr (this_cache, E_E6_REGNUM,
670 sc_base + AM33_SIGCONTEXT_E6);
671 trad_frame_set_reg_addr (this_cache, E_E7_REGNUM,
672 sc_base + AM33_SIGCONTEXT_E7);
674 trad_frame_set_reg_addr (this_cache, E_LAR_REGNUM,
675 sc_base + AM33_SIGCONTEXT_LAR);
676 trad_frame_set_reg_addr (this_cache, E_LIR_REGNUM,
677 sc_base + AM33_SIGCONTEXT_LIR);
678 trad_frame_set_reg_addr (this_cache, E_MDR_REGNUM,
679 sc_base + AM33_SIGCONTEXT_MDR);
680 trad_frame_set_reg_addr (this_cache, E_MCVF_REGNUM,
681 sc_base + AM33_SIGCONTEXT_MCVF);
682 trad_frame_set_reg_addr (this_cache, E_MCRL_REGNUM,
683 sc_base + AM33_SIGCONTEXT_MCRL);
684 trad_frame_set_reg_addr (this_cache, E_MDRQ_REGNUM,
685 sc_base + AM33_SIGCONTEXT_MDRQ);
687 trad_frame_set_reg_addr (this_cache, E_SP_REGNUM,
688 sc_base + AM33_SIGCONTEXT_SP);
689 trad_frame_set_reg_addr (this_cache, E_PSW_REGNUM,
690 sc_base + AM33_SIGCONTEXT_EPSW);
691 trad_frame_set_reg_addr (this_cache, E_PC_REGNUM,
692 sc_base + AM33_SIGCONTEXT_PC);
694 fpubase = get_frame_memory_unsigned (this_frame,
695 sc_base + AM33_SIGCONTEXT_FPUCONTEXT,
699 for (i = 0; i < 32; i++)
701 trad_frame_set_reg_addr (this_cache, E_FS0_REGNUM + i,
704 trad_frame_set_reg_addr (this_cache, E_FPCR_REGNUM, fpubase + 4 * 32);
707 trad_frame_set_id (this_cache, frame_id_build (sc_base, func));
710 /* AM33 GNU/Linux osabi has been recognized.
711 Now's our chance to register our corefile handling. */
714 am33_linux_init_osabi (struct gdbarch_info info, struct gdbarch *gdbarch)
716 linux_init_abi (info, gdbarch);
718 set_gdbarch_iterate_over_regset_sections
719 (gdbarch, am33_iterate_over_regset_sections);
720 set_solib_svr4_fetch_link_map_offsets
721 (gdbarch, svr4_ilp32_fetch_link_map_offsets);
723 tramp_frame_prepend_unwinder (gdbarch, &am33_linux_sigframe);
724 tramp_frame_prepend_unwinder (gdbarch, &am33_linux_rt_sigframe);
727 /* Provide a prototype to silence -Wmissing-prototypes. */
728 extern initialize_file_ftype _initialize_mn10300_linux_tdep;
731 _initialize_mn10300_linux_tdep (void)
733 gdbarch_register_osabi (bfd_arch_mn10300, 0,
734 GDB_OSABI_LINUX, am33_linux_init_osabi);