diff options
author | Joel Brobecker <brobecker@gnat.com> | 2006-10-06 02:01:34 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2006-10-06 02:01:34 +0000 |
commit | dabc0282bdab766cd5e967d5506943a8cc281580 (patch) | |
tree | 111ad2ad882a4e644367826e53f37533596d0d91 /gdb/blockframe.c | |
parent | 51024f0a6f65b0dd29e9d0d0875135e15e27ce20 (diff) | |
download | gdb-dabc0282bdab766cd5e967d5506943a8cc281580.tar.gz |
* blockframe.c (block_innermost_frame): Rewrite frame search logic.
Diffstat (limited to 'gdb/blockframe.c')
-rw-r--r-- | gdb/blockframe.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gdb/blockframe.c b/gdb/blockframe.c index ba298c3f61f..8dfa0069a10 100644 --- a/gdb/blockframe.c +++ b/gdb/blockframe.c @@ -358,14 +358,15 @@ block_innermost_frame (struct block *block) start = BLOCK_START (block); end = BLOCK_END (block); - frame = NULL; - while (1) + frame = get_current_frame (); + while (frame != NULL) { - frame = get_prev_frame (frame); - if (frame == NULL) - return NULL; calling_pc = get_frame_address_in_block (frame); if (calling_pc >= start && calling_pc < end) return frame; + + frame = get_prev_frame (frame); } + + return NULL; } |