diff options
author | Andrew Cagney <cagney@redhat.com> | 2000-02-29 13:28:24 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2000-02-29 13:28:24 +0000 |
commit | 1211c4e429f8a2e8e70558160e94d6af6490c51f (patch) | |
tree | 151b4ec86fd2214335788ed929c7414d4694016e /gdb | |
parent | 2fc18c15d20c966ea7df140334e182753c3bde0e (diff) | |
download | gdb-1211c4e429f8a2e8e70558160e94d6af6490c51f.zip gdb-1211c4e429f8a2e8e70558160e94d6af6490c51f.tar.gz gdb-1211c4e429f8a2e8e70558160e94d6af6490c51f.tar.bz2 |
From J.T.: Convert i386 to updated frame_saved_regs.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 9 | ||||
-rw-r--r-- | gdb/config/i386/tm-i386.h | 6 | ||||
-rw-r--r-- | gdb/i386-tdep.c | 24 |
3 files changed, 24 insertions, 15 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 907c372..451cffa 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,12 @@ +Wed Mar 1 00:06:19 2000 Andrew Cagney <cagney@b1.cygnus.com> + + From 1999-08-13 J.T. Conklin <jtc@redback.com>: + * config/i386/tm-i386.h (FRAME_INIT_SAVED_REGS): Replace + FRAME_FIND_SAVED_REGS. + (i386_frame_init_saved_regs): Replace i386_frame_find_saved_regs. + * i386-tdep.c (i386_frame_init_saved_regs, i386_pop_frame): + Update. + Tue Feb 29 23:56:41 2000 Andrew Cagney <cagney@b1.cygnus.com> From 2000-02-23 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>: diff --git a/gdb/config/i386/tm-i386.h b/gdb/config/i386/tm-i386.h index 5181845..6e3207e 100644 --- a/gdb/config/i386/tm-i386.h +++ b/gdb/config/i386/tm-i386.h @@ -357,11 +357,9 @@ extern int i386_frame_num_args PARAMS ((struct frame_info *)); ways in the stack frame. sp is even more special: the address we return for it IS the sp for the next frame. */ -#define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) \ -{ i386_frame_find_saved_regs ((frame_info), &(frame_saved_regs)); } +extern void i386_frame_init_saved_regs PARAMS ((struct frame_info *)); +#define FRAME_INIT_SAVED_REGS(FI) i386_frame_init_saved_regs (FI) -extern void i386_frame_find_saved_regs PARAMS ((struct frame_info *, - struct frame_saved_regs *)); /* Things needed for making the inferior call functions. */ diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index 4df478e..c381961 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -475,9 +475,8 @@ i386_frame_num_args (fi) */ void -i386_frame_find_saved_regs (fip, fsrp) +i386_frame_init_saved_regs (fip) struct frame_info *fip; - struct frame_saved_regs *fsrp; { long locals = -1; unsigned char op; @@ -486,7 +485,10 @@ i386_frame_find_saved_regs (fip, fsrp) CORE_ADDR pc; int i; - memset (fsrp, 0, sizeof *fsrp); + if (fip->saved_regs) + return; + + frame_saved_regs_zalloc (fip); /* if frame is the end of a dummy, compute where the * beginning would be @@ -501,7 +503,7 @@ i386_frame_find_saved_regs (fip, fsrp) for (i = 0; i < NUM_REGS; i++) { adr -= REGISTER_RAW_SIZE (i); - fsrp->regs[i] = adr; + fip->saved_regs[i] = adr; } return; } @@ -520,16 +522,16 @@ i386_frame_find_saved_regs (fip, fsrp) break; #ifdef I386_REGNO_TO_SYMMETRY /* Dynix uses different internal numbering. Ick. */ - fsrp->regs[I386_REGNO_TO_SYMMETRY (op - 0x50)] = adr; + fip->saved_regs[I386_REGNO_TO_SYMMETRY (op - 0x50)] = adr; #else - fsrp->regs[op - 0x50] = adr; + fip->saved_regs[op - 0x50] = adr; #endif adr -= 4; } } - fsrp->regs[PC_REGNUM] = fip->frame + 4; - fsrp->regs[FP_REGNUM] = fip->frame; + fip->saved_regs[PC_REGNUM] = fip->frame + 4; + fip->saved_regs[FP_REGNUM] = fip->frame; } /* return pc of first real instruction */ @@ -640,15 +642,15 @@ i386_pop_frame () struct frame_info *frame = get_current_frame (); CORE_ADDR fp; int regnum; - struct frame_saved_regs fsr; char regbuf[MAX_REGISTER_RAW_SIZE]; fp = FRAME_FP (frame); - get_frame_saved_regs (frame, &fsr); + i386_frame_init_saved_regs (frame); + for (regnum = 0; regnum < NUM_REGS; regnum++) { CORE_ADDR adr; - adr = fsr.regs[regnum]; + adr = frame->saved_regs[regnum]; if (adr) { read_memory (adr, regbuf, REGISTER_RAW_SIZE (regnum)); |