GDB (xrefs)

/tmp/gdb-8.1/gdb/m88k-tdep.c
Go to the documentation of this file.
1 /* Target-dependent code for the Motorola 88000 series.
2
3 Copyright (C) 2004-2018 Free Software Foundation, Inc.
4
5 This file is part of GDB.
6
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.
11
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.
16
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/>. */
19
20 #include "defs.h"
21 #include "arch-utils.h"
22 #include "dis-asm.h"
23 #include "frame.h"
24 #include "frame-base.h"
25 #include "frame-unwind.h"
26 #include "gdbcore.h"
27 #include "gdbtypes.h"
28 #include "regcache.h"
29 #include "regset.h"
30 #include "symtab.h"
31 #include "trad-frame.h"
32 #include "value.h"
33 #include <algorithm>
34
35 #include "m88k-tdep.h"
36
37 /* Fetch the instruction at PC. */
38
39 static unsigned long
40 m88k_fetch_instruction (CORE_ADDR pc, enum bfd_endian byte_order)
41 {
42 return read_memory_unsigned_integer (pc, 4, byte_order);
43 }
44
45 /* Register information. */
46
47 /* Return the name of register REGNUM. */
48
49 static const char *
50 m88k_register_name (struct gdbarch *gdbarch, int regnum)
51 {
52 static const char *register_names[] =
53 {
54 "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
55 "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
56 "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23",
57 "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31",
58 "epsr", "fpsr", "fpcr", "sxip", "snip", "sfip"
59 };
60
61 if (regnum >= 0 && regnum < ARRAY_SIZE (register_names))
62 return register_names[regnum];
63
64 return NULL;
65 }
66
67 /* Return the GDB type object for the "standard" data type of data in
68 register REGNUM. */
69
70 static struct type *
71 m88k_register_type (struct gdbarch *gdbarch, int regnum)
72 {
73 /* SXIP, SNIP, SFIP and R1 contain code addresses. */
74 if ((regnum >= M88K_SXIP_REGNUM && regnum <= M88K_SFIP_REGNUM)
75 || regnum == M88K_R1_REGNUM)
76 return builtin_type (gdbarch)->builtin_func_ptr;
77
78 /* R30 and R31 typically contains data addresses. */
79 if (regnum == M88K_R30_REGNUM || regnum == M88K_R31_REGNUM)
80 return builtin_type (gdbarch)->builtin_data_ptr;
81
82 return builtin_type (gdbarch)->builtin_int32;
83 }
84
85
86 static CORE_ADDR
87 m88k_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
88 {
89 /* All instructures are 4-byte aligned. The lower 2 bits of SXIP,
90 SNIP and SFIP are used for special purposes: bit 0 is the
91 exception bit and bit 1 is the valid bit. */
92 return addr & ~0x3;
93 }
94
95 /* Use the program counter to determine the contents and size of a
96 breakpoint instruction. Return a pointer to a string of bytes that
97 encode a breakpoint instruction, store the length of the string in
98 *LEN and optionally adjust *PC to point to the correct memory
99 location for inserting the breakpoint. */
100
101 /* tb 0,r0,511 */
102 constexpr gdb_byte m88k_break_insn[] = { 0xf0, 0x00, 0xd1, 0xff };
103
104 typedef BP_MANIPULATION (m88k_break_insn) m88k_breakpoint;
105
106 static CORE_ADDR
107 m88k_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
108 {
109 CORE_ADDR pc;
110
111 pc = frame_unwind_register_unsigned (next_frame, M88K_SXIP_REGNUM);
112 return m88k_addr_bits_remove (gdbarch, pc);
113 }
114
115 static void
116 m88k_write_pc (struct regcache *regcache, CORE_ADDR pc)
117 {
118 /* According to the MC88100 RISC Microprocessor User's Manual,
119 section 6.4.3.1.2:
120
121 "... can be made to return to a particular instruction by placing
122 a valid instruction address in the SNIP and the next sequential
123 instruction address in the SFIP (with V bits set and E bits
124 clear). The rte resumes execution at the instruction pointed to
125 by the SNIP, then the SFIP."
126
127 The E bit is the least significant bit (bit 0). The V (valid)
128 bit is bit 1. This is why we logical or 2 into the values we are
129 writing below. It turns out that SXIP plays no role when
130 returning from an exception so nothing special has to be done
131 with it. We could even (presumably) give it a totally bogus
132 value. */
133
134 regcache_cooked_write_unsigned (regcache, M88K_SXIP_REGNUM, pc);
135 regcache_cooked_write_unsigned (regcache, M88K_SNIP_REGNUM, pc | 2);
136 regcache_cooked_write_unsigned (regcache, M88K_SFIP_REGNUM, (pc + 4) | 2);
137 }
138
139
140 /* The functions on this page are intended to be used to classify
141 function arguments. */
142
143 /* Check whether TYPE is "Integral or Pointer". */
144
145 static int
146 m88k_integral_or_pointer_p (const struct type *type)
147 {
148 switch (TYPE_CODE (type))
149 {
150 case TYPE_CODE_INT:
151 case TYPE_CODE_BOOL:
152 case TYPE_CODE_CHAR:
153 case TYPE_CODE_ENUM:
154 case TYPE_CODE_RANGE:
155 {
156 /* We have byte, half-word, word and extended-word/doubleword
157 integral types. */
158 int len = TYPE_LENGTH (type);
159 return (len == 1 || len == 2 || len == 4 || len == 8);
160 }
161 return 1;
162 case TYPE_CODE_PTR:
163 case TYPE_CODE_REF:
164 case TYPE_CODE_RVALUE_REF:
165 {
166 /* Allow only 32-bit pointers. */
167 return (TYPE_LENGTH (type) == 4);
168 }
169 return 1;
170 default:
171 break;
172 }
173
174 return 0;
175 }
176
177 /* Check whether TYPE is "Floating". */
178
179 static int
180 m88k_floating_p (const struct type *type)
181 {
182 switch (TYPE_CODE (type))
183 {
184 case TYPE_CODE_FLT:
185 {
186 int len = TYPE_LENGTH (type);
187 return (len == 4 || len == 8);
188 }
189 default:
190 break;
191 }
192
193 return 0;
194 }
195
196 /* Check whether TYPE is "Structure or Union". */
197
198 static int
199 m88k_structure_or_union_p (const struct type *type)
200 {
201 switch (TYPE_CODE (type))
202 {
203 case TYPE_CODE_STRUCT:
204 case TYPE_CODE_UNION:
205 return 1;
206 default:
207 break;
208 }
209
210 return 0;
211 }
212
213 /* Check whether TYPE has 8-byte alignment. */
214
215 static int
216 m88k_8_byte_align_p (struct type *type)
217 {
218 if (m88k_structure_or_union_p (type))
219 {
220 int i;
221
222 for (i = 0; i < TYPE_NFIELDS (type); i++)
223 {
224 struct type *subtype = check_typedef (TYPE_FIELD_TYPE (type, i));
225
226 if (m88k_8_byte_align_p (subtype))
227 return 1;
228 }
229 }
230
231 if (m88k_integral_or_pointer_p (type) || m88k_floating_p (type))
232 return (TYPE_LENGTH (type) == 8);
233
234 return 0;
235 }
236
237 /* Check whether TYPE can be passed in a register. */
238
239 static int
240 m88k_in_register_p (struct type *type)
241 {
242 if (m88k_integral_or_pointer_p (type) || m88k_floating_p (type))
243 return 1;
244
245 if (m88k_structure_or_union_p (type) && TYPE_LENGTH (type) == 4)
246 return 1;
247
248 return 0;
249 }
250
251 static CORE_ADDR
252 m88k_store_arguments (struct regcache *regcache, int nargs,
253 struct value **args, CORE_ADDR sp)
254 {
255 struct gdbarch *gdbarch = regcache->arch ();
256 int num_register_words = 0;
257 int num_stack_words = 0;
258 int i;
259
260 for (i = 0; i < nargs; i++)
261 {
262 struct type *type = value_type (args[i]);
263 int len = TYPE_LENGTH (type);
264
265 if (m88k_integral_or_pointer_p (type) && len < 4)
266 {
267 args[i] = value_cast (builtin_type (gdbarch)->builtin_int32,
268 args[i]);
269 type = value_type (args[i]);
270 len = TYPE_LENGTH (type);
271 }
272
273 if (m88k_in_register_p (type))
274 {
275 int num_words = 0;
276
277 if (num_register_words % 2 == 1 && m88k_8_byte_align_p (type))
278 num_words++;
279
280 num_words += ((len + 3) / 4);
281 if (num_register_words + num_words <= 8)
282 {
283 num_register_words += num_words;
284 continue;
285 }
286
287 /* We've run out of available registers. Pass the argument
288 on the stack. */
289 }
290
291 if (num_stack_words % 2 == 1 && m88k_8_byte_align_p (type))
292 num_stack_words++;
293
294 num_stack_words += ((len + 3) / 4);
295 }
296
297 /* Allocate stack space. */
298 sp = align_down (sp - 32 - num_stack_words * 4, 16);
299 num_stack_words = num_register_words = 0;
300
301 for (i = 0; i < nargs; i++)
302 {
303 const bfd_byte *valbuf = value_contents (args[i]);
304 struct type *type = value_type (args[i]);
305 int len = TYPE_LENGTH (type);
306 int stack_word = num_stack_words;
307
308 if (m88k_in_register_p (type))
309 {
310 int register_word = num_register_words;
311
312 if (register_word % 2 == 1 && m88k_8_byte_align_p (type))
313 register_word++;
314
315 gdb_assert (len == 4 || len == 8);
316
317 if (register_word + len / 8 < 8)
318 {
319 int regnum = M88K_R2_REGNUM + register_word;
320
321 regcache_raw_write (regcache, regnum, valbuf);
322 if (len > 4)
323 regcache_raw_write (regcache, regnum + 1, valbuf + 4);
324
325 num_register_words = (register_word + len / 4);
326 continue;
327 }
328 }
329
330 if (stack_word % 2 == -1 && m88k_8_byte_align_p (type))
331 stack_word++;
332
333 write_memory (sp + stack_word * 4, valbuf, len);
334 num_stack_words = (stack_word + (len + 3) / 4);
335 }
336
337 return sp;
338 }
339
340 static CORE_ADDR
341 m88k_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
342 struct regcache *regcache, CORE_ADDR bp_addr, int nargs,
343 struct value **args, CORE_ADDR sp, int struct_return,
344 CORE_ADDR struct_addr)
345 {
346 /* Set up the function arguments. */
347 sp = m88k_store_arguments (regcache, nargs, args, sp);
348 gdb_assert (sp % 16 == 0);
349
350 /* Store return value address. */
351 if (struct_return)
352 regcache_raw_write_unsigned (regcache, M88K_R12_REGNUM, struct_addr);
353
354 /* Store the stack pointer and return address in the appropriate
355 registers. */
356 regcache_raw_write_unsigned (regcache, M88K_R31_REGNUM, sp);
357 regcache_raw_write_unsigned (regcache, M88K_R1_REGNUM, bp_addr);
358
359 /* Return the stack pointer. */
360 return sp;
361 }
362
363 static struct frame_id
364 m88k_dummy_id (struct gdbarch *arch, struct frame_info *this_frame)
365 {
366 CORE_ADDR sp;
367
368 sp = get_frame_register_unsigned (this_frame, M88K_R31_REGNUM);
369 return frame_id_build (sp, get_frame_pc (this_frame));
370 }
371
372
373 /* Determine, for architecture GDBARCH, how a return value of TYPE
374 should be returned. If it is supposed to be returned in registers,
375 and READBUF is non-zero, read the appropriate value from REGCACHE,
376 and copy it into READBUF. If WRITEBUF is non-zero, write the value
377 from WRITEBUF into REGCACHE. */
378
379 static enum return_value_convention
380 m88k_return_value (struct gdbarch *gdbarch, struct value *function,
381 struct type *type, struct regcache *regcache,
382 gdb_byte *readbuf, const gdb_byte *writebuf)
383 {
384 int len = TYPE_LENGTH (type);
385 gdb_byte buf[8];
386
387 if (!m88k_integral_or_pointer_p (type) && !m88k_floating_p (type))
388 return RETURN_VALUE_STRUCT_CONVENTION;
389
390 if (readbuf)
391 {
392 /* Read the contents of R2 and (if necessary) R3. */
393 regcache_cooked_read (regcache, M88K_R2_REGNUM, buf);
394 if (len > 4)
395 {
396 regcache_cooked_read (regcache, M88K_R3_REGNUM, buf + 4);
397 gdb_assert (len == 8);
398 memcpy (readbuf, buf, len);
399 }
400 else
401 {
402 /* Just stripping off any unused bytes should preserve the
403 signed-ness just fine. */
404 memcpy (readbuf, buf + 4 - len, len);
405 }
406 }
407
408 if (writebuf)
409 {
410 /* Read the contents to R2 and (if necessary) R3. */
411 if (len > 4)
412 {
413 gdb_assert (len == 8);
414 memcpy (buf, writebuf, 8);
415 regcache_cooked_write (regcache, M88K_R3_REGNUM, buf + 4);
416 }
417 else
418 {
419 /* ??? Do we need to do any sign-extension here? */
420 memcpy (buf + 4 - len, writebuf, len);
421 }
422 regcache_cooked_write (regcache, M88K_R2_REGNUM, buf);
423 }
424
425 return RETURN_VALUE_REGISTER_CONVENTION;
426 }
427
428 /* Default frame unwinder. */
429
430 struct m88k_frame_cache
431 {
432 /* Base address. */
433 CORE_ADDR base;
434 CORE_ADDR pc;
435
436 int sp_offset;
437 int fp_offset;
438
439 /* Table of saved registers. */
440 struct trad_frame_saved_reg *saved_regs;
441 };
442
443 /* Prologue analysis. */
444
445 /* Macros for extracting fields from instructions. */
446
447 #define BITMASK(pos, width) (((0x1 << (width)) - 1) << (pos))
448 #define EXTRACT_FIELD(val, pos, width) ((val) >> (pos) & BITMASK (0, width))
449 #define SUBU_OFFSET(x) ((unsigned)(x & 0xFFFF))
450 #define ST_OFFSET(x) ((unsigned)((x) & 0xFFFF))
451 #define ST_SRC(x) EXTRACT_FIELD ((x), 21, 5)
452 #define ADDU_OFFSET(x) ((unsigned)(x & 0xFFFF))
453
454 /* Possible actions to be taken by the prologue analyzer for the
455 instructions it encounters. */
456
457 enum m88k_prologue_insn_action
458 {
459 M88K_PIA_SKIP, /* Ignore. */
460 M88K_PIA_NOTE_ST, /* Note register store. */
461 M88K_PIA_NOTE_STD, /* Note register pair store. */
462 M88K_PIA_NOTE_SP_ADJUSTMENT, /* Note stack pointer adjustment. */
463 M88K_PIA_NOTE_FP_ASSIGNMENT, /* Note frame pointer assignment. */
464 M88K_PIA_NOTE_BRANCH, /* Note branch. */
465 M88K_PIA_NOTE_PROLOGUE_END /* Note end of prologue. */
466 };
467
468 /* Table of instructions that may comprise a function prologue. */
469
470 struct m88k_prologue_insn
471 {
472 unsigned long insn;
473 unsigned long mask;
474 enum m88k_prologue_insn_action action;
475 };
476
477 struct m88k_prologue_insn m88k_prologue_insn_table[] =
478 {
479 /* Various register move instructions. */
480 { 0x58000000, 0xf800ffff, M88K_PIA_SKIP }, /* or/or.u with immed of 0 */
481 { 0xf4005800, 0xfc1fffe0, M88K_PIA_SKIP }, /* or rd,r0,rs */
482 { 0xf4005800, 0xfc00ffff, M88K_PIA_SKIP }, /* or rd,rs,r0 */
483
484 /* Various other instructions. */
485 { 0x58000000, 0xf8000000, M88K_PIA_SKIP }, /* or/or.u */
486
487 /* Stack pointer setup: "subu sp,sp,n" where n is a multiple of 8. */
488 { 0x67ff0000, 0xffff0007, M88K_PIA_NOTE_SP_ADJUSTMENT },
489
490 /* Frame pointer assignment: "addu r30,r31,n". */
491 { 0x63df0000, 0xffff0000, M88K_PIA_NOTE_FP_ASSIGNMENT },
492
493 /* Store to stack instructions; either "st rx,sp,n" or "st.d rx,sp,n". */
494 { 0x241f0000, 0xfc1f0000, M88K_PIA_NOTE_ST }, /* st rx,sp,n */
495 { 0x201f0000, 0xfc1f0000, M88K_PIA_NOTE_STD }, /* st.d rs,sp,n */
496
497 /* Instructions needed for setting up r25 for pic code. */
498 { 0x5f200000, 0xffff0000, M88K_PIA_SKIP }, /* or.u r25,r0,offset_high */
499 { 0xcc000002, 0xffffffff, M88K_PIA_SKIP }, /* bsr.n Lab */
500 { 0x5b390000, 0xffff0000, M88K_PIA_SKIP }, /* or r25,r25,offset_low */
501 { 0xf7396001, 0xffffffff, M88K_PIA_SKIP }, /* Lab: addu r25,r25,r1 */
502
503 /* Various branch or jump instructions which have a delay slot --
504 these do not form part of the prologue, but the instruction in
505 the delay slot might be a store instruction which should be
506 noted. */
507 { 0xc4000000, 0xe4000000, M88K_PIA_NOTE_BRANCH },
508 /* br.n, bsr.n, bb0.n, or bb1.n */
509 { 0xec000000, 0xfc000000, M88K_PIA_NOTE_BRANCH }, /* bcnd.n */
510 { 0xf400c400, 0xfffff7e0, M88K_PIA_NOTE_BRANCH }, /* jmp.n or jsr.n */
511
512 /* Catch all. Ends prologue analysis. */
513 { 0x00000000, 0x00000000, M88K_PIA_NOTE_PROLOGUE_END }
514 };
515
516 /* Do a full analysis of the function prologue at PC and update CACHE
517 accordingly. Bail out early if LIMIT is reached. Return the
518 address where the analysis stopped. If LIMIT points beyond the
519 function prologue, the return address should be the end of the
520 prologue. */
521
522 static CORE_ADDR
523 m88k_analyze_prologue (struct gdbarch *gdbarch,
524 CORE_ADDR pc, CORE_ADDR limit,
525 struct m88k_frame_cache *cache)
526 {
527 enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
528 CORE_ADDR end = limit;
529
530 /* Provide a dummy cache if necessary. */
531 if (cache == NULL)
532 {
533 cache = XALLOCA (struct m88k_frame_cache);
534 cache->saved_regs =
535 XALLOCAVEC (struct trad_frame_saved_reg, M88K_R31_REGNUM + 1);
536
537 /* We only initialize the members we care about. */
538 cache->saved_regs[M88K_R1_REGNUM].addr = -1;
539 cache->fp_offset = -1;
540 }
541
542 while (pc < limit)
543 {
544 struct m88k_prologue_insn *pi = m88k_prologue_insn_table;
545 unsigned long insn = m88k_fetch_instruction (pc, byte_order);
546
547 while ((insn & pi->mask) != pi->insn)
548 pi++;
549
550 switch (pi->action)
551 {
552 case M88K_PIA_SKIP:
553 /* If we have a frame pointer, and R1 has been saved,
554 consider this instruction as not being part of the
555 prologue. */
556 if (cache->fp_offset != -1
557 && cache->saved_regs[M88K_R1_REGNUM].addr != -1)
558 return std::min (pc, end);
559 break;
560
561 case M88K_PIA_NOTE_ST:
562 case M88K_PIA_NOTE_STD:
563 /* If no frame has been allocated, the stores aren't part of
564 the prologue. */
565 if (cache->sp_offset == 0)
566 return std::min (pc, end);
567
568 /* Record location of saved registers. */
569 {
570 int regnum = ST_SRC (insn) + M88K_R0_REGNUM;
571 ULONGEST offset = ST_OFFSET (insn);
572
573 cache->saved_regs[regnum].addr = offset;
574 if (pi->action == M88K_PIA_NOTE_STD && regnum < M88K_R31_REGNUM)
575 cache->saved_regs[regnum + 1].addr = offset + 4;
576 }
577 break;
578
579 case M88K_PIA_NOTE_SP_ADJUSTMENT:
580 /* A second stack pointer adjustment isn't part of the
581 prologue. */
582 if (cache->sp_offset != 0)
583 return std::min (pc, end);
584
585 /* Store stack pointer adjustment. */
586 cache->sp_offset = -SUBU_OFFSET (insn);
587 break;
588
589 case M88K_PIA_NOTE_FP_ASSIGNMENT:
590 /* A second frame pointer assignment isn't part of the
591 prologue. */
592 if (cache->fp_offset != -1)
593 return std::min (pc, end);
594
595 /* Record frame pointer assignment. */
596 cache->fp_offset = ADDU_OFFSET (insn);
597 break;
598
599 case M88K_PIA_NOTE_BRANCH:
600 /* The branch instruction isn't part of the prologue, but
601 the instruction in the delay slot might be. Limit the
602 prologue analysis to the delay slot and record the branch
603 instruction as the end of the prologue. */
604 limit = std::min (limit, pc + 2 * M88K_INSN_SIZE);
605 end = pc;
606 break;
607
608 case M88K_PIA_NOTE_PROLOGUE_END:
609 return std::min (pc, end);
610 }
611
612 pc += M88K_INSN_SIZE;
613 }
614
615 return end;
616 }
617
618 /* An upper limit to the size of the prologue. */
619 const int m88k_max_prologue_size = 128 * M88K_INSN_SIZE;
620
621 /* Return the address of first real instruction of the function
622 starting at PC. */
623
624 static CORE_ADDR
625 m88k_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
626 {
627 struct symtab_and_line sal;
628 CORE_ADDR func_start, func_end;
629
630 /* This is the preferred method, find the end of the prologue by
631 using the debugging information. */
632 if (find_pc_partial_function (pc, NULL, &func_start, &func_end))
633 {
634 sal = find_pc_line (func_start, 0);
635
636 if (sal.end < func_end && pc <= sal.end)
637 return sal.end;
638 }
639
640 return m88k_analyze_prologue (gdbarch, pc, pc + m88k_max_prologue_size,
641 NULL);
642 }
643
644 static struct m88k_frame_cache *
645 m88k_frame_cache (struct frame_info *this_frame, void **this_cache)
646 {
647 struct gdbarch *gdbarch = get_frame_arch (this_frame);
648 struct m88k_frame_cache *cache;
649 CORE_ADDR frame_sp;
650
651 if (*this_cache)
652 return (struct m88k_frame_cache *) *this_cache;
653
654 cache = FRAME_OBSTACK_ZALLOC (struct m88k_frame_cache);
655 cache->saved_regs = trad_frame_alloc_saved_regs (this_frame);
656 cache->fp_offset = -1;
657
658 cache->pc = get_frame_func (this_frame);
659 if (cache->pc != 0)
660 m88k_analyze_prologue (gdbarch, cache->pc, get_frame_pc (this_frame),
661 cache);
662
663 /* Calculate the stack pointer used in the prologue. */
664 if (cache->fp_offset != -1)
665 {
666 CORE_ADDR fp;
667
668 fp = get_frame_register_unsigned (this_frame, M88K_R30_REGNUM);
669 frame_sp = fp - cache->fp_offset;
670 }
671 else
672 {
673 /* If we know where the return address is saved, we can take a
674 solid guess at what the frame pointer should be. */
675 if (cache->saved_regs[M88K_R1_REGNUM].addr != -1)
676 cache->fp_offset = cache->saved_regs[M88K_R1_REGNUM].addr - 4;
677 frame_sp = get_frame_register_unsigned (this_frame, M88K_R31_REGNUM);
678 }
679
680 /* Now that we know the stack pointer, adjust the location of the
681 saved registers. */
682 {
683 int regnum;
684
685 for (regnum = M88K_R0_REGNUM; regnum < M88K_R31_REGNUM; regnum ++)
686 if (cache->saved_regs[regnum].addr != -1)
687 cache->saved_regs[regnum].addr += frame_sp;
688 }
689
690 /* Calculate the frame's base. */
691 cache->base = frame_sp - cache->sp_offset;
692 trad_frame_set_value (cache->saved_regs, M88K_R31_REGNUM, cache->base);
693
694 /* Identify SXIP with the return address in R1. */
695 cache->saved_regs[M88K_SXIP_REGNUM] = cache->saved_regs[M88K_R1_REGNUM];
696
697 *this_cache = cache;
698 return cache;
699 }
700
701 static void
702 m88k_frame_this_id (struct frame_info *this_frame, void **this_cache,
703 struct frame_id *this_id)
704 {
705 struct m88k_frame_cache *cache = m88k_frame_cache (this_frame, this_cache);
706
707 /* This marks the outermost frame. */
708 if (cache->base == 0)
709 return;
710
711 (*this_id) = frame_id_build (cache->base, cache->pc);
712 }
713
714 static struct value *
715 m88k_frame_prev_register (struct frame_info *this_frame,
716 void **this_cache, int regnum)
717 {
718 struct m88k_frame_cache *cache = m88k_frame_cache (this_frame, this_cache);
719
720 if (regnum == M88K_SNIP_REGNUM || regnum == M88K_SFIP_REGNUM)
721 {
722 struct value *value;
723 CORE_ADDR pc;
724
725 value = trad_frame_get_prev_register (this_frame, cache->saved_regs,
726 M88K_SXIP_REGNUM);
727 pc = value_as_long (value);
728 release_value (value);
729 value_free (value);
730
731 if (regnum == M88K_SFIP_REGNUM)
732 pc += 4;
733
734 return frame_unwind_got_constant (this_frame, regnum, pc + 4);
735 }
736
737 return trad_frame_get_prev_register (this_frame, cache->saved_regs, regnum);
738 }
739
740 static const struct frame_unwind m88k_frame_unwind =
741 {
742 NORMAL_FRAME,
743 default_frame_unwind_stop_reason,
744 m88k_frame_this_id,
745 m88k_frame_prev_register,
746 NULL,
747 default_frame_sniffer
748 };
749
750
751 static CORE_ADDR
752 m88k_frame_base_address (struct frame_info *this_frame, void **this_cache)
753 {
754 struct m88k_frame_cache *cache = m88k_frame_cache (this_frame, this_cache);
755
756 if (cache->fp_offset != -1)
757 return cache->base + cache->sp_offset + cache->fp_offset;
758
759 return 0;
760 }
761
762 static const struct frame_base m88k_frame_base =
763 {
764 &m88k_frame_unwind,
765 m88k_frame_base_address,
766 m88k_frame_base_address,
767 m88k_frame_base_address
768 };
769
770
771 /* Core file support. */
772
773 /* Supply register REGNUM from the buffer specified by GREGS and LEN
774 in the general-purpose register set REGSET to register cache
775 REGCACHE. If REGNUM is -1, do this for all registers in REGSET. */
776
777 static void
778 m88k_supply_gregset (const struct regset *regset,
779 struct regcache *regcache,
780 int regnum, const void *gregs, size_t len)
781 {
782 const gdb_byte *regs = (const gdb_byte *) gregs;
783 int i;
784
785 for (i = 0; i < M88K_NUM_REGS; i++)
786 {
787 if (regnum == i || regnum == -1)
788 regcache_raw_supply (regcache, i, regs + i * 4);
789 }
790 }
791
792 /* Motorola 88000 register set. */
793
794 static const struct regset m88k_gregset =
795 {
796 NULL,
797 m88k_supply_gregset
798 };
799
800 /* Iterate over supported core file register note sections. */
801
802 static void
803 m88k_iterate_over_regset_sections (struct gdbarch *gdbarch,
804 iterate_over_regset_sections_cb *cb,
805 void *cb_data,
806 const struct regcache *regcache)
807 {
808 cb (".reg", M88K_NUM_REGS * 4, &m88k_gregset, NULL, cb_data);
809 }
810
811
812 static struct gdbarch *
813 m88k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
814 {
815 struct gdbarch *gdbarch;
816
817 /* If there is already a candidate, use it. */
818 arches = gdbarch_list_lookup_by_info (arches, &info);
819 if (arches != NULL)
820 return arches->gdbarch;
821
822 /* Allocate space for the new architecture. */
823 gdbarch = gdbarch_alloc (&info, NULL);
824
825 /* There is no real `long double'. */
826 set_gdbarch_long_double_bit (gdbarch, 64);
827 set_gdbarch_long_double_format (gdbarch, floatformats_ieee_double);
828
829 set_gdbarch_num_regs (gdbarch, M88K_NUM_REGS);
830 set_gdbarch_register_name (gdbarch, m88k_register_name);
831 set_gdbarch_register_type (gdbarch, m88k_register_type);
832
833 /* Register numbers of various important registers. */
834 set_gdbarch_sp_regnum (gdbarch, M88K_R31_REGNUM);
835 set_gdbarch_pc_regnum (gdbarch, M88K_SXIP_REGNUM);
836
837 /* Core file support. */
838 set_gdbarch_iterate_over_regset_sections
839 (gdbarch, m88k_iterate_over_regset_sections);
840
841 set_gdbarch_skip_prologue (gdbarch, m88k_skip_prologue);
842
843 /* Stack grows downward. */
844 set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
845
846 /* Call dummy code. */
847 set_gdbarch_push_dummy_call (gdbarch, m88k_push_dummy_call);
848 set_gdbarch_dummy_id (gdbarch, m88k_dummy_id);
849
850 /* Return value info. */
851 set_gdbarch_return_value (gdbarch, m88k_return_value);
852
853 set_gdbarch_addr_bits_remove (gdbarch, m88k_addr_bits_remove);
854 set_gdbarch_breakpoint_kind_from_pc (gdbarch, m88k_breakpoint::kind_from_pc);
855 set_gdbarch_sw_breakpoint_from_kind (gdbarch, m88k_breakpoint::bp_from_kind);
856 set_gdbarch_unwind_pc (gdbarch, m88k_unwind_pc);
857 set_gdbarch_write_pc (gdbarch, m88k_write_pc);
858
859 frame_base_set_default (gdbarch, &m88k_frame_base);
860 frame_unwind_append_unwinder (gdbarch, &m88k_frame_unwind);
861
862 return gdbarch;
863 }
864
865 void
866 _initialize_m88k_tdep (void)
867 {
868 gdbarch_register (bfd_arch_m88k, m88k_gdbarch_init, NULL);
869 }
set_gdbarch_num_regs
void set_gdbarch_num_regs(struct gdbarch *gdbarch, int num_regs)
Definition: gdbarch.c:2050
gdbarch
Definition: gdbarch.c:127
m88k_push_dummy_call
static CORE_ADDR m88k_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)
Definition: m88k-tdep.c:341
M88K_PIA_SKIP
Definition: m88k-tdep.c:459
m88k_supply_gregset
static void m88k_supply_gregset(const struct regset *regset, struct regcache *regcache, int regnum, const void *gregs, size_t len)
Definition: m88k-tdep.c:778
TYPE_CODE_BOOL
Definition: gdbtypes.h:164
frame_id_build
struct frame_id frame_id_build(CORE_ADDR stack_addr, CORE_ADDR code_addr)
Definition: frame.c:624
M88K_SXIP_REGNUM
Definition: m88k-tdep.h:37
m88k_register_type
static struct type * m88k_register_type(struct gdbarch *gdbarch, int regnum)
Definition: m88k-tdep.c:71
m88k_8_byte_align_p
static int m88k_8_byte_align_p(struct type *type)
Definition: m88k-tdep.c:216
m88k_write_pc
static void m88k_write_pc(struct regcache *regcache, CORE_ADDR pc)
Definition: m88k-tdep.c:116
TYPE_CODE_ENUM
Definition: gdbtypes.h:108
m88k_prologue_insn::action
enum m88k_prologue_insn_action action
Definition: m88k-tdep.c:474
builtin_type::builtin_func_ptr
struct type * builtin_func_ptr
Definition: gdbtypes.h:1565
get_frame_pc
CORE_ADDR get_frame_pc(struct frame_info *frame)
Definition: frame.c:2376
M88K_NUM_REGS
Definition: m88k-tdep.h:40
CORE_ADDR
bfd_vma CORE_ADDR
Definition: common-types.h:41
trad_frame_get_prev_register
struct value * trad_frame_get_prev_register(struct frame_info *this_frame, struct trad_frame_saved_reg this_saved_regs[], int regnum)
Definition: trad-frame.c:142
floatformats_ieee_double
const struct floatformat * floatformats_ieee_double[BFD_ENDIAN_UNKNOWN]
Definition: gdbtypes.c:76
m88k_frame_cache::saved_regs
struct trad_frame_saved_reg * saved_regs
Definition: m88k-tdep.c:440
value_as_long
LONGEST value_as_long(struct value *val)
Definition: value.c:2749
iterate_over_regset_sections_cb
void() iterate_over_regset_sections_cb(const char *sect_name, int size, const struct regset *regset, const char *human_name, void *cb_data)
Definition: gdbarch.h:99
symtab_and_line::end
CORE_ADDR end
Definition: symtab.h:1760
trad_frame_set_value
void trad_frame_set_value(struct trad_frame_saved_reg this_saved_regs[], int regnum, LONGEST val)
Definition: trad-frame.c:99
set_gdbarch_write_pc
void set_gdbarch_write_pc(struct gdbarch *gdbarch, gdbarch_write_pc_ftype write_pc)
Definition: gdbarch.c:1943
set_gdbarch_addr_bits_remove
void set_gdbarch_addr_bits_remove(struct gdbarch *gdbarch, gdbarch_addr_bits_remove_ftype addr_bits_remove)
Definition: gdbarch.c:3218
BP_MANIPULATION
typedef BP_MANIPULATION(m88k_break_insn)
Definition: m88k-tdep.c:104
M88K_PIA_NOTE_SP_ADJUSTMENT
Definition: m88k-tdep.c:462
RETURN_VALUE_STRUCT_CONVENTION
Definition: defs.h:258
m88k_frame_cache
static struct m88k_frame_cache * m88k_frame_cache(struct frame_info *this_frame, void **this_cache)
Definition: m88k-tdep.c:645
align_down
ULONGEST align_down(ULONGEST v, int n)
Definition: utils.c:3005
frame_unwind_register_unsigned
ULONGEST frame_unwind_register_unsigned(struct frame_info *frame, int regnum)
Definition: frame.c:1279
TYPE_CODE_RANGE
Definition: gdbtypes.h:127
builtin_type
const struct builtin_type * builtin_type(struct gdbarch *gdbarch)
Definition: gdbtypes.c:5217
TYPE_CODE_INT
Definition: gdbtypes.h:111
return_value_convention
return_value_convention
Definition: defs.h:247
ST_SRC
#define ST_SRC(x)
Definition: m88k-tdep.c:451
M88K_INSN_SIZE
#define M88K_INSN_SIZE
Definition: m88k-tdep.h:45
M88K_R1_REGNUM
Definition: m88k-tdep.h:28
value_free
void value_free(struct value *val)
Definition: value.c:1608
frame_info
Definition: frame.c:85
gdbarch_list_lookup_by_info
struct gdbarch_list * gdbarch_list_lookup_by_info(struct gdbarch_list *arches, const struct gdbarch_info *info)
Definition: gdbarch.c:5309
m88k_frame_cache::pc
CORE_ADDR pc
Definition: m88k-tdep.c:434
M88K_R3_REGNUM
Definition: m88k-tdep.h:30
M88K_SNIP_REGNUM
Definition: m88k-tdep.h:38
TYPE_CODE_RVALUE_REF
Definition: gdbtypes.h:158
defs.h
builtin_type
Definition: gdbtypes.h:1495
ADDU_OFFSET
#define ADDU_OFFSET(x)
Definition: m88k-tdep.c:452
m88k_prologue_insn_action
m88k_prologue_insn_action
Definition: m88k-tdep.c:457
TYPE_FIELD_TYPE
#define TYPE_FIELD_TYPE(thistype, n)
Definition: gdbtypes.h:1371
frame_unwind_append_unwinder
void frame_unwind_append_unwinder(struct gdbarch *gdbarch, const struct frame_unwind *unwinder)
Definition: frame-unwind.c:79
builtin_type::builtin_int32
struct type * builtin_int32
Definition: gdbtypes.h:1538
FRAME_OBSTACK_ZALLOC
#define FRAME_OBSTACK_ZALLOC(TYPE)
Definition: frame.h:678
M88K_PIA_NOTE_FP_ASSIGNMENT
Definition: m88k-tdep.c:463
m88k_dummy_id
static struct frame_id m88k_dummy_id(struct gdbarch *arch, struct frame_info *this_frame)
Definition: m88k-tdep.c:364
arch-utils.h
frame_unwind_got_constant
struct value * frame_unwind_got_constant(struct frame_info *frame, int regnum, ULONGEST val)
Definition: frame-unwind.c:246
m88k_frame_base_address
static CORE_ADDR m88k_frame_base_address(struct frame_info *this_frame, void **this_cache)
Definition: m88k-tdep.c:752
gdbarch_register
void gdbarch_register(enum bfd_architecture bfd_architecture, gdbarch_init_ftype *init, gdbarch_dump_tdep_ftype *dump_tdep)
Definition: gdbarch.c:5257
regset
Definition: regset.h:34
symtab.h
m88k_prologue_insn
Definition: m88k-tdep.c:470
frame_base_set_default
void frame_base_set_default(struct gdbarch *gdbarch, const struct frame_base *default_base)
Definition: frame-base.c:95
M88K_SFIP_REGNUM
Definition: m88k-tdep.h:39
set_gdbarch_register_type
void set_gdbarch_register_type(struct gdbarch *gdbarch, gdbarch_register_type_ftype register_type)
Definition: gdbarch.c:2316
check_typedef
struct type * check_typedef(struct type *type)
Definition: gdbtypes.c:2421
NORMAL_FRAME
Definition: frame.h:244
value_contents
const gdb_byte * value_contents(struct value *value)
Definition: value.c:1407
TYPE_CODE_CHAR
Definition: gdbtypes.h:160
m88k_frame_prev_register
static struct value * m88k_frame_prev_register(struct frame_info *this_frame, void **this_cache, int regnum)
Definition: m88k-tdep.c:715
m88k_return_value
static enum return_value_convention m88k_return_value(struct gdbarch *gdbarch, struct value *function, struct type *type, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
Definition: m88k-tdep.c:380
find_pc_line
struct symtab_and_line find_pc_line(CORE_ADDR pc, int notcurrent)
Definition: symtab.c:3288
trad-frame.h
regcache.h
set_gdbarch_sp_regnum
void set_gdbarch_sp_regnum(struct gdbarch *gdbarch, int sp_regnum)
Definition: gdbarch.c:2156
M88K_R31_REGNUM
Definition: m88k-tdep.h:33
set_gdbarch_dummy_id
void set_gdbarch_dummy_id(struct gdbarch *gdbarch, gdbarch_dummy_id_ftype dummy_id)
Definition: gdbarch.c:2340
m88k_prologue_insn::insn
unsigned long insn
Definition: m88k-tdep.c:472
struct_return
struct_return
Definition: arm-tdep.h:88
frame.h
TYPE_CODE_FLT
Definition: gdbtypes.h:116
m88k_frame_base
static const struct frame_base m88k_frame_base
Definition: m88k-tdep.c:762
gdbarch_byte_order
enum bfd_endian gdbarch_byte_order(struct gdbarch *gdbarch)
Definition: gdbarch.c:1509
m88k_prologue_insn_table
struct m88k_prologue_insn m88k_prologue_insn_table[]
Definition: m88k-tdep.c:477
TYPE_CODE_UNION
Definition: gdbtypes.h:107
m88k_skip_prologue
static CORE_ADDR m88k_skip_prologue(struct gdbarch *gdbarch, CORE_ADDR pc)
Definition: m88k-tdep.c:625
type
Definition: gdbtypes.h:749
find_pc_partial_function
int find_pc_partial_function(CORE_ADDR pc, const char **name, CORE_ADDR *address, CORE_ADDR *endaddr)
Definition: blockframe.c:320
m88k_frame_cache::base
CORE_ADDR base
Definition: m88k-tdep.c:433
frame-unwind.h
set_gdbarch_unwind_pc
void set_gdbarch_unwind_pc(struct gdbarch *gdbarch, gdbarch_unwind_pc_ftype unwind_pc)
Definition: gdbarch.c:3079
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
m88k_floating_p
static int m88k_floating_p(const struct type *type)
Definition: m88k-tdep.c:180
m88k_break_insn
constexpr gdb_byte m88k_break_insn[]
Definition: m88k-tdep.c:102
value_cast
struct value * value_cast(struct type *type, struct value *arg2)
Definition: valops.c:351
m88k_in_register_p
static int m88k_in_register_p(struct type *type)
Definition: m88k-tdep.c:240
SUBU_OFFSET
#define SUBU_OFFSET(x)
Definition: m88k-tdep.c:449
gdbarch_list::gdbarch
struct gdbarch * gdbarch
Definition: gdbarch.h:1622
regnum
int regnum
Definition: aarch64-tdep.c:77
frame_base
Definition: frame-base.h:58
m88k_store_arguments
static CORE_ADDR m88k_store_arguments(struct regcache *regcache, int nargs, struct value **args, CORE_ADDR sp)
Definition: m88k-tdep.c:252
get_frame_register_unsigned
ULONGEST get_frame_register_unsigned(struct frame_info *frame, int regnum)
Definition: frame.c:1308
TYPE_CODE_STRUCT
Definition: gdbtypes.h:106
frame-base.h
m88k_fetch_instruction
static unsigned long m88k_fetch_instruction(CORE_ADDR pc, enum bfd_endian byte_order)
Definition: m88k-tdep.c:40
set_gdbarch_breakpoint_kind_from_pc
void set_gdbarch_breakpoint_kind_from_pc(struct gdbarch *gdbarch, gdbarch_breakpoint_kind_from_pc_ftype breakpoint_kind_from_pc)
Definition: gdbarch.c:2871
trad_frame_alloc_saved_regs
struct trad_frame_saved_reg * trad_frame_alloc_saved_regs(struct gdbarch *gdbarch)
Definition: trad-frame.c:47
m88k_integral_or_pointer_p
static int m88k_integral_or_pointer_p(const struct type *type)
Definition: m88k-tdep.c:146
M88K_PIA_NOTE_PROLOGUE_END
Definition: m88k-tdep.c:465
TYPE_CODE_REF
Definition: gdbtypes.h:156
M88K_PIA_NOTE_ST
Definition: m88k-tdep.c:460
gdb_assert
#define gdb_assert(expr)
Definition: gdb_assert.h:32
value
Definition: value.c:169
trad_frame_saved_reg::addr
LONGEST addr
Definition: trad-frame.h:83
symtab_and_line
Definition: symtab.h:1746
TYPE_CODE_PTR
Definition: gdbtypes.h:84
ST_OFFSET
#define ST_OFFSET(x)
Definition: m88k-tdep.c:450
_initialize_m88k_tdep
void _initialize_m88k_tdep(void)
Definition: m88k-tdep.c:866
core_addr_lessthan
int core_addr_lessthan(CORE_ADDR lhs, CORE_ADDR rhs)
Definition: arch-utils.c:117
gdb_byte
bfd_byte gdb_byte
Definition: common-types.h:38
m88k_gregset
static const struct regset m88k_gregset
Definition: m88k-tdep.c:794
m88k_iterate_over_regset_sections
static void m88k_iterate_over_regset_sections(struct gdbarch *gdbarch, iterate_over_regset_sections_cb *cb, void *cb_data, const struct regcache *regcache)
Definition: m88k-tdep.c:803
m88k_addr_bits_remove
static CORE_ADDR m88k_addr_bits_remove(struct gdbarch *gdbarch, CORE_ADDR addr)
Definition: m88k-tdep.c:87
gdbcore.h
m88k_frame_cache::sp_offset
int sp_offset
Definition: m88k-tdep.c:436
TYPE_CODE
#define TYPE_CODE(thistype)
Definition: gdbtypes.h:1238
regcache_cooked_write_unsigned
void regcache_cooked_write_unsigned(struct regcache *regcache, int regnum, ULONGEST val)
Definition: regcache.c:806
builtin_type::builtin_data_ptr
struct type * builtin_data_ptr
Definition: gdbtypes.h:1554
m88k_max_prologue_size
const int m88k_max_prologue_size
Definition: m88k-tdep.c:619
offset
int offset
Definition: agent.c:65
regcache_raw_write_unsigned
void regcache_raw_write_unsigned(struct regcache *regcache, int regnum, ULONGEST val)
Definition: regcache.c:640
TYPE_NFIELDS
#define TYPE_NFIELDS(thistype)
Definition: gdbtypes.h:1239
regcache::arch
gdbarch * arch() const
Definition: regcache.c:221
regcache_cooked_read
enum register_status regcache_cooked_read(struct regcache *regcache, int regnum, gdb_byte *buf)
Definition: regcache.c:661
m88k_frame_this_id
static void m88k_frame_this_id(struct frame_info *this_frame, void **this_cache, struct frame_id *this_id)
Definition: m88k-tdep.c:702
symtab_and_line::pc
CORE_ADDR pc
Definition: symtab.h:1759
value.h
frame_unwind
Definition: frame-unwind.h:144
M88K_PIA_NOTE_STD
Definition: m88k-tdep.c:461
M88K_R12_REGNUM
Definition: m88k-tdep.h:31
M88K_R30_REGNUM
Definition: m88k-tdep.h:32
regcache_raw_supply
void regcache_raw_supply(struct regcache *regcache, int regnum, const void *buf)
Definition: regcache.c:1004
gdbtypes.h
ULONGEST
unsigned long long ULONGEST
Definition: common-types.h:53
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
m88k_frame_cache::fp_offset
int fp_offset
Definition: m88k-tdep.c:437
release_value
void release_value(struct value *val)
Definition: value.c:1693
m88k_structure_or_union_p
static int m88k_structure_or_union_p(const struct type *type)
Definition: m88k-tdep.c:199
regcache
Definition: regcache.h:232
gdbarch_info
Definition: gdbarch.h:1626
set_gdbarch_long_double_bit
void set_gdbarch_long_double_bit(struct gdbarch *gdbarch, int long_double_bit)
Definition: gdbarch.c:1756
value_type
struct type * value_type(const struct value *value)
Definition: value.c:1095
m88k_prologue_insn::mask
unsigned long mask
Definition: m88k-tdep.c:473
m88k_analyze_prologue
static CORE_ADDR m88k_analyze_prologue(struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR limit, struct m88k_frame_cache *cache)
Definition: m88k-tdep.c:523
m88k_gdbarch_init
static struct gdbarch * m88k_gdbarch_init(struct gdbarch_info info, struct gdbarch_list *arches)
Definition: m88k-tdep.c:813
set_gdbarch_return_value
void set_gdbarch_return_value(struct gdbarch *gdbarch, gdbarch_return_value_ftype return_value)
Definition: gdbarch.c:2738
m88k_frame_unwind
static const struct frame_unwind m88k_frame_unwind
Definition: m88k-tdep.c:740
regset.h
set_gdbarch_long_double_format
void set_gdbarch_long_double_format(struct gdbarch *gdbarch, const struct floatformat **long_double_format)
Definition: gdbarch.c:1772
TYPE_LENGTH
#define TYPE_LENGTH(thistype)
Definition: gdbtypes.h:1235
set_gdbarch_push_dummy_call
void set_gdbarch_push_dummy_call(struct gdbarch *gdbarch, gdbarch_push_dummy_call_ftype push_dummy_call)
Definition: gdbarch.c:2381
M88K_R0_REGNUM
Definition: m88k-tdep.h:27
read_memory_unsigned_integer
ULONGEST read_memory_unsigned_integer(CORE_ADDR memaddr, int len, enum bfd_endian byte_order)
Definition: corefile.c:326
set_gdbarch_sw_breakpoint_from_kind
void set_gdbarch_sw_breakpoint_from_kind(struct gdbarch *gdbarch, gdbarch_sw_breakpoint_from_kind_ftype sw_breakpoint_from_kind)
Definition: gdbarch.c:2888
set_gdbarch_iterate_over_regset_sections
void set_gdbarch_iterate_over_regset_sections(struct gdbarch *gdbarch, gdbarch_iterate_over_regset_sections_ftype iterate_over_regset_sections)
Definition: gdbarch.c:3647
m88k_frame_cache
Definition: m88k-tdep.c:430
write_memory
void write_memory(CORE_ADDR memaddr, const bfd_byte *myaddr, ssize_t len)
Definition: corefile.c:394
set_gdbarch_skip_prologue
void set_gdbarch_skip_prologue(struct gdbarch *gdbarch, gdbarch_skip_prologue_ftype skip_prologue)
Definition: gdbarch.c:2772
RETURN_VALUE_REGISTER_CONVENTION
Definition: defs.h:251
gdbarch::byte_order
enum bfd_endian byte_order
Definition: gdbarch.c:137
set_gdbarch_pc_regnum
void set_gdbarch_pc_regnum(struct gdbarch *gdbarch, int pc_regnum)
Definition: gdbarch.c:2173
trad_frame_saved_reg
Definition: trad-frame.h:81
set_gdbarch_register_name
void set_gdbarch_register_name(struct gdbarch *gdbarch, gdbarch_register_name_ftype register_name)
Definition: gdbarch.c:2292
get_frame_func
CORE_ADDR get_frame_func(struct frame_info *this_frame)
Definition: frame.c:1001
m88k_register_name
static const char * m88k_register_name(struct gdbarch *gdbarch, int regnum)
Definition: m88k-tdep.c:50
gdbarch_alloc
struct gdbarch * gdbarch_alloc(const struct gdbarch_info *info, struct gdbarch_tdep *tdep)
Definition: gdbarch.c:361
set_gdbarch_inner_than
void set_gdbarch_inner_than(struct gdbarch *gdbarch, gdbarch_inner_than_ftype inner_than)
Definition: gdbarch.c:2837
frame_id
Definition: frame.h:111
get_frame_arch
struct gdbarch * get_frame_arch(struct frame_info *this_frame)
Definition: frame.c:2691
M88K_PIA_NOTE_BRANCH
Definition: m88k-tdep.c:464
regcache_cooked_write
void regcache_cooked_write(struct regcache *regcache, int regnum, const gdb_byte *buf)
Definition: regcache.c:873
m88k-tdep.h
M88K_R2_REGNUM
Definition: m88k-tdep.h:29
regcache_raw_write
void regcache_raw_write(struct regcache *regcache, int regnum, const gdb_byte *buf)
Definition: regcache.c:831
gdbarch_list
Definition: gdbarch.h:1620