diff options
author | Kevin Buettner <kevinb@redhat.com> | 2002-08-06 22:42:56 +0000 |
---|---|---|
committer | Kevin Buettner <kevinb@redhat.com> | 2002-08-06 22:42:56 +0000 |
commit | dce0751a033ab311b02c630d52886bb334bcbd68 (patch) | |
tree | f30d75a9fa7d47fb1f294ab967bd54c7b60dc121 /gdb/frame.c | |
parent | dbde77403e888a64d8794d6f1057fb5d499f5386 (diff) | |
download | gdb-dce0751a033ab311b02c630d52886bb334bcbd68.tar.gz |
* frame.c (find_saved_register): Break out of loop once saved
register address is found. Don't mention sparc in loop comment
anymore.
Diffstat (limited to 'gdb/frame.c')
-rw-r--r-- | gdb/frame.c | 12 |
1 files changed, 7 insertions, 5 deletions
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; |