From: John Gilmore Date: Sat, 29 Aug 1992 04:22:31 +0000 (+0000) Subject: Minor bug fixes from last big checkin. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d6434f3974a54ad6498c23327414c01ca3a5241c;p=binutils-gdb.git Minor bug fixes from last big checkin. --- diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index 5bee145831f..45d6af4b003 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -39,12 +39,14 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include + +extern struct obstack frame_cache_obstack; + extern int errno; /* Nonzero if we just simulated a single step break. */ int one_stepped; - /* Breakpoint shadows for the single step instructions will be kept here. */ static struct sstep_breaks { @@ -399,7 +401,7 @@ FIXME: This whole concept is broken. You should be able to detect a dummy stack frame *on the user's stack itself*. When you do, then you know the format of that stack frame -- including its saved SP register! There should *not* be a separate stack in the -GDB process that keeps track of these dummy frames! -- gnu@cygnus.com Aug92 */ +GDB process that keeps track of these dummy frames! -- gnu@cygnus.com Aug92 */ pop_dummy_frame () @@ -546,7 +548,7 @@ fix_call_dummy(dummyname, pc, fun, nargs, type) */ void function_frame_info (pc, fdata) - int pc; + CORE_ADDR pc; struct aix_framedata *fdata; { unsigned int tmp; diff --git a/gdb/tm-rs6000.h b/gdb/tm-rs6000.h index 34d26065b70..1adcc8673a3 100644 --- a/gdb/tm-rs6000.h +++ b/gdb/tm-rs6000.h @@ -98,6 +98,8 @@ struct aix_framedata { char frameless; /* true if frameless functions. */ }; +void +function_frame_info PARAMS ((CORE_ADDR, struct aix_framedata *)); /* Define the byte order of the machine. */ @@ -491,43 +493,44 @@ extern unsigned int rs6000_struct_return_address; #define FRAME_FIND_SAVED_REGS(FRAME_INFO, FRAME_SAVED_REGS) \ { \ - int ii, frame_addr, func_start; \ - struct aix_framedata fdata; \ - \ - /* find the start of the function and collect info about its frame. */ \ - \ - func_start = get_pc_function_start ((FRAME_INFO)->pc) + FUNCTION_START_OFFSET;\ - function_frame_info (func_start, &fdata); \ - bzero (&(FRAME_SAVED_REGS), sizeof (FRAME_SAVED_REGS)); \ - \ - /* if there were any saved registers, figure out parent's stack pointer. */ \ - frame_addr = 0; \ - /* the following is true only if the frame doesn't have a call to alloca(), \ - FIXME. */ \ - if (fdata.saved_fpr >= 0 || fdata.saved_gpr >= 0) { \ - if ((FRAME_INFO)->prev && (FRAME_INFO)->prev->frame) \ - frame_addr = (FRAME_INFO)->prev->frame; \ - else \ - frame_addr = read_memory_integer ((FRAME_INFO)->frame, 4); \ - } \ - \ - /* if != -1, fdata.saved_fpr is the smallest number of saved_fpr. All fpr's \ - from saved_fpr to fp31 are saved right underneath caller stack pointer, \ - starting from fp31 first. */ \ - \ - if (fdata.saved_fpr >= 0) { \ - for (ii=31; ii >= fdata.saved_fpr; --ii) \ - (FRAME_SAVED_REGS).regs [FP0_REGNUM + ii] = frame_addr - ((32 - ii) * 8); \ - frame_addr -= (32 - fdata.saved_fpr) * 8; \ - } \ - \ - /* if != -1, fdata.saved_gpr is the smallest number of saved_gpr. All gpr's \ - from saved_gpr to gpr31 are saved right under saved fprs, starting \ - from r31 first. */ \ - \ - if (fdata.saved_gpr >= 0) \ - for (ii=31; ii >= fdata.saved_gpr; --ii) \ - (FRAME_SAVED_REGS).regs [ii] = frame_addr - ((32 - ii) * 4); \ + int ii; \ + CORE_ADDR frame_addr, func_start; \ + struct aix_framedata fdata; \ + \ + /* find the start of the function and collect info about its frame. */\ + \ + func_start = get_pc_function_start ((FRAME_INFO)->pc) + FUNCTION_START_OFFSET; \ + function_frame_info (func_start, &fdata); \ + bzero (&(FRAME_SAVED_REGS), sizeof (FRAME_SAVED_REGS)); \ + \ + /* if there were any saved registers, figure out parent's stack pointer. */ \ + frame_addr = 0; \ + /* the following is true only if the frame doesn't have a call to alloca(), \ + FIXME. */ \ + if (fdata.saved_fpr >= 0 || fdata.saved_gpr >= 0) { \ + if ((FRAME_INFO)->prev && (FRAME_INFO)->prev->frame) \ + frame_addr = (FRAME_INFO)->prev->frame; \ + else \ + frame_addr = read_memory_integer ((FRAME_INFO)->frame, 4); \ + } \ + \ + /* if != -1, fdata.saved_fpr is the smallest number of saved_fpr. All fpr's \ + from saved_fpr to fp31 are saved right underneath caller stack pointer, \ + starting from fp31 first. */ \ + \ + if (fdata.saved_fpr >= 0) { \ + for (ii=31; ii >= fdata.saved_fpr; --ii) \ + (FRAME_SAVED_REGS).regs [FP0_REGNUM + ii] = frame_addr - ((32 - ii) * 8); \ + frame_addr -= (32 - fdata.saved_fpr) * 8; \ + } \ + \ + /* if != -1, fdata.saved_gpr is the smallest number of saved_gpr. All gpr's \ + from saved_gpr to gpr31 are saved right under saved fprs, starting \ + from r31 first. */ \ + \ + if (fdata.saved_gpr >= 0) \ + for (ii=31; ii >= fdata.saved_gpr; --ii) \ + (FRAME_SAVED_REGS).regs [ii] = frame_addr - ((32 - ii) * 4); \ }