From: Kevin Buettner Date: Tue, 6 Aug 2002 22:42:56 +0000 (+0000) Subject: * frame.c (find_saved_register): Break out of loop once saved X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b2f01c350b6337fd14ca507473ca4670ff8b9e38;p=binutils-gdb.git * frame.c (find_saved_register): Break out of loop once saved register address is found. Don't mention sparc in loop comment anymore. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6c3d33624da..e28a8046bfb 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2002-08-06 Kevin Buettner + + * frame.c (find_saved_register): Break out of loop once saved + register address is found. Don't mention sparc in loop comment + anymore. + 2002-08-06 Kevin Buettner * mips-tdep.c (mips_gdbarch_init): For the N32 ABI, set diff --git a/gdb/frame.c b/gdb/frame.c index 5c52ed1a0a2..10d609dd2f9 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -94,10 +94,9 @@ find_saved_register (struct frame_info *frame, int regnum) if (frame == NULL) /* No regs saved if want current frame */ return 0; - /* Note that this next routine assumes that registers used in - frame x will be saved only in the frame that x calls and - frames interior to it. This is not true on the sparc, but the - above macro takes care of it, so we should be all right. */ + /* Note that the following loop assumes that registers used in + frame x will be saved only in the frame that x calls and frames + interior to it. */ while (1) { QUIT; @@ -107,7 +106,10 @@ find_saved_register (struct frame_info *frame, int regnum) frame = frame1; FRAME_INIT_SAVED_REGS (frame1); if (frame1->saved_regs[regnum]) - addr = frame1->saved_regs[regnum]; + { + addr = frame1->saved_regs[regnum]; + break; + } } return addr;