diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-01-08 01:53:38 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-01-08 01:53:38 +0000 |
commit | 1e2330ba1fbf486c2851272e2aa09dd57ad367e6 (patch) | |
tree | 9a92bb6aff20e7c56c6efce933de70fd249841e1 /gdb/mn10200-tdep.c | |
parent | a3982d4858ac407c7e879a57762bc4130d54d4b8 (diff) | |
download | gdb-1e2330ba1fbf486c2851272e2aa09dd57ad367e6.zip gdb-1e2330ba1fbf486c2851272e2aa09dd57ad367e6.tar.gz gdb-1e2330ba1fbf486c2851272e2aa09dd57ad367e6.tar.bz2 |
2003-01-07 Andrew Cagney <cagney@redhat.com>
* alpha-tdep.c: Use get_frame_base.
* arm-tdep.c, avr-tdep.c, cris-tdep.c, d10v-tdep.c: Ditto.
* h8300-tdep.c, i386-tdep.c, ia64-tdep.c, m68hc11-tdep.c: Ditto.
* m68k-tdep.c, mcore-tdep.c, mips-tdep.c, mn10200-tdep.c: Ditto.
* mn10300-tdep.c, ns32k-tdep.c, s390-tdep.c, sh-tdep.c: Ditto.
* sparc-tdep.c, v850-tdep.c, vax-tdep.c: Ditto.
* x86-64-linux-tdep.c, xstormy16-tdep.c: Ditto.
* config/h8500/tm-h8500.h, config/mn10200/tm-mn10200.h: Ditto.
* config/sparc/tm-sparc.h: Ditto.
Diffstat (limited to 'gdb/mn10200-tdep.c')
-rw-r--r-- | gdb/mn10200-tdep.c | 52 |
1 files changed, 27 insertions, 25 deletions
diff --git a/gdb/mn10200-tdep.c b/gdb/mn10200-tdep.c index 808f7e4..1e6827b 100644 --- a/gdb/mn10200-tdep.c +++ b/gdb/mn10200-tdep.c @@ -435,10 +435,10 @@ mn10200_analyze_prologue (struct frame_info *fi, CORE_ADDR pc) { if (fi) { - fi->fsr.regs[2] = fi->frame + fi->stack_size + 4; - fi->fsr.regs[3] = fi->frame + fi->stack_size + 8; - fi->fsr.regs[5] = fi->frame + fi->stack_size + 12; - fi->fsr.regs[6] = fi->frame + fi->stack_size + 16; + fi->fsr.regs[2] = get_frame_base (fi) + fi->stack_size + 4; + fi->fsr.regs[3] = get_frame_base (fi) + fi->stack_size + 8; + fi->fsr.regs[5] = get_frame_base (fi) + fi->stack_size + 12; + fi->fsr.regs[6] = get_frame_base (fi) + fi->stack_size + 16; } return addr; } @@ -455,10 +455,10 @@ mn10200_analyze_prologue (struct frame_info *fi, CORE_ADDR pc) { if (fi) { - fi->fsr.regs[2] = fi->frame + fi->stack_size + 4; - fi->fsr.regs[3] = fi->frame + fi->stack_size + 8; - fi->fsr.regs[5] = fi->frame + fi->stack_size + 12; - fi->fsr.regs[6] = fi->frame + fi->stack_size + 16; + fi->fsr.regs[2] = get_frame_base (fi) + fi->stack_size + 4; + fi->fsr.regs[3] = get_frame_base (fi) + fi->stack_size + 8; + fi->fsr.regs[5] = get_frame_base (fi) + fi->stack_size + 12; + fi->fsr.regs[6] = get_frame_base (fi) + fi->stack_size + 16; } return addr; } @@ -472,10 +472,10 @@ mn10200_analyze_prologue (struct frame_info *fi, CORE_ADDR pc) { if (fi && fi->next == NULL) { - fi->fsr.regs[2] = fi->frame + fi->stack_size + 4; - fi->fsr.regs[3] = fi->frame + fi->stack_size + 8; - fi->fsr.regs[5] = fi->frame + fi->stack_size + 12; - fi->fsr.regs[6] = fi->frame + fi->stack_size + 16; + fi->fsr.regs[2] = get_frame_base (fi) + fi->stack_size + 4; + fi->fsr.regs[3] = get_frame_base (fi) + fi->stack_size + 8; + fi->fsr.regs[5] = get_frame_base (fi) + fi->stack_size + 12; + fi->fsr.regs[6] = get_frame_base (fi) + fi->stack_size + 16; } return addr; } @@ -488,16 +488,16 @@ mn10200_analyze_prologue (struct frame_info *fi, CORE_ADDR pc) /* Now that we know the size of the outgoing arguments, fix fi->frame again if this is the innermost frame. */ if (fi && fi->next == NULL) - deprecated_update_frame_base_hack (fi, fi->frame - outgoing_args_size); + deprecated_update_frame_base_hack (fi, get_frame_base (fi) - outgoing_args_size); /* Note the register save information and update the stack size for this frame too. */ if (fi) { - fi->fsr.regs[2] = fi->frame + fi->stack_size + 4; - fi->fsr.regs[3] = fi->frame + fi->stack_size + 8; - fi->fsr.regs[5] = fi->frame + fi->stack_size + 12; - fi->fsr.regs[6] = fi->frame + fi->stack_size + 16; + fi->fsr.regs[2] = get_frame_base (fi) + fi->stack_size + 4; + fi->fsr.regs[3] = get_frame_base (fi) + fi->stack_size + 8; + fi->fsr.regs[5] = get_frame_base (fi) + fi->stack_size + 12; + fi->fsr.regs[6] = get_frame_base (fi) + fi->stack_size + 16; fi->stack_size += outgoing_args_size; } /* There can be no more prologue insns, so return now. */ @@ -534,7 +534,7 @@ mn10200_analyze_prologue (struct frame_info *fi, CORE_ADDR pc) status = target_read_memory (addr + 2, buf, 1); if (status != 0) return addr; - fi->fsr.regs[2] = (fi->frame + stack_size + fi->fsr.regs[2] = (get_frame_base (fi) + stack_size + extract_signed_integer (buf, 1)); } addr += 3; @@ -551,7 +551,7 @@ mn10200_analyze_prologue (struct frame_info *fi, CORE_ADDR pc) status = target_read_memory (addr + 2, buf, 1); if (status != 0) return addr; - fi->fsr.regs[3] = (fi->frame + stack_size + fi->fsr.regs[3] = (get_frame_base (fi) + stack_size + extract_signed_integer (buf, 1)); } addr += 3; @@ -568,7 +568,7 @@ mn10200_analyze_prologue (struct frame_info *fi, CORE_ADDR pc) status = target_read_memory (addr + 1, buf, 1); if (status != 0) return addr; - fi->fsr.regs[5] = (fi->frame + stack_size + fi->fsr.regs[5] = (get_frame_base (fi) + stack_size + extract_signed_integer (buf, 1)); } addr += 2; @@ -585,7 +585,7 @@ mn10200_analyze_prologue (struct frame_info *fi, CORE_ADDR pc) status = target_read_memory (addr + 1, buf, 1); if (status != 0) return addr; - fi->fsr.regs[6] = (fi->frame + stack_size + fi->fsr.regs[6] = (get_frame_base (fi) + stack_size + extract_signed_integer (buf, 1)); fi->status &= ~CALLER_A2_IN_A0; } @@ -641,7 +641,7 @@ mn10200_frame_chain (struct frame_info *fi) So we set up a dummy frame and call mn10200_analyze_prologue to find stuff for us. */ deprecated_update_frame_pc_hack (dummy_frame, FRAME_SAVED_PC (fi)); - deprecated_update_frame_base_hack (dummy_frame, fi->frame); + deprecated_update_frame_base_hack (dummy_frame, get_frame_base (fi)); memset (dummy_frame->fsr.regs, '\000', sizeof dummy_frame->fsr.regs); dummy_frame->status = 0; dummy_frame->stack_size = 0; @@ -663,7 +663,7 @@ mn10200_frame_chain (struct frame_info *fi) { /* Our caller does not have a frame pointer. So his frame starts at the base of our frame (fi->frame) + <his size> + 4 (saved pc). */ - ret = fi->frame + -dummy_frame->stack_size + 4; + ret = get_frame_base (fi) + -dummy_frame->stack_size + 4; } do_cleanups (old_chain); return ret; @@ -689,7 +689,9 @@ mn10200_pop_frame (struct frame_info *frame) { int regnum; - if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame), frame->frame, frame->frame)) + if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame), + get_frame_base (frame), + get_frame_base (frame))) generic_pop_dummy_frame (); else { @@ -858,7 +860,7 @@ CORE_ADDR mn10200_frame_saved_pc (struct frame_info *fi) { /* The saved PC will always be at the base of the current frame. */ - return (read_memory_integer (fi->frame, REGISTER_SIZE) & 0xffffff); + return (read_memory_integer (get_frame_base (fi), REGISTER_SIZE) & 0xffffff); } /* Function: init_extra_frame_info |