From h8300hds*
[deliverable/binutils-gdb.git] / gdb / h8300-tdep.c
CommitLineData
400943fb
SC
1#include <stdio.h>
2#include "defs.h"
3
4/* an easy to debug H8 stack frame looks like:
50x6df2 push r2
60x6df3 push r3
70x6df6 push r6
80x mov.w r7,r6
9 subs stuff,sp mov.w #x,r5
10 subs r5,sp
11
12 */
13#define IS_PUSH(x) ((x & 0xff00)==0x6d00)
14CORE_ADDR h8300_skip_prologue(start_pc)
15CORE_ADDR start_pc;
0a8f9d31 16
0a8f9d31 17{
400943fb
SC
18 /* Skip past all push insns */
19 short int w;
0a8f9d31 20
400943fb
SC
21 w = read_memory_integer(start_pc, 2);
22 while (IS_PUSH(w))
23 {
24 start_pc+=2;
25 w = read_memory_integer(start_pc, 2);
26 }
27return start_pc;
0a8f9d31
SC
28
29}
30
31h8300_pop_frame()
32{
33 printf("pop frame\n");
34
35}
36
400943fb
SC
37int
38print_insn(memaddr, stream)
39CORE_ADDR memaddr;
40FILE *stream;
0a8f9d31 41{
400943fb
SC
42 /* Nothing is bigger than 8 bytes */
43 char data[8];
44 read_memory (memaddr, data, sizeof(data));
45 return print_insn_h8300(memaddr, data , stream);
46
47
0a8f9d31 48}
400943fb
SC
49
50
51
52 FRAME_CHAIN()
53 {
54
55 printf("Frame chain\n");
56
57 }
58
59
This page took 0.026145 seconds and 4 git commands to generate.