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 | b2f01c350b6337fd14ca507473ca4670ff8b9e38 (patch) | |
tree | 5d54e1f7454edd4a38e31919e066896b54b580ab /gdb/frame.c | |
parent | dbac4f5ba804fa7f8891696dbf41b0495db7446d (diff) | |
download | gdb-b2f01c350b6337fd14ca507473ca4670ff8b9e38.zip gdb-b2f01c350b6337fd14ca507473ca4670ff8b9e38.tar.gz gdb-b2f01c350b6337fd14ca507473ca4670ff8b9e38.tar.bz2 |
* 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 5c52ed1..10d609d 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; |