From: Andrew Cagney Date: Fri, 4 Apr 2003 04:25:35 +0000 (+0000) Subject: 2003-04-03 Andrew Cagney X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f46a289cb18f363f41a4bef398dff60eb615a744;p=thirdparty%2Fbinutils-gdb.git 2003-04-03 Andrew Cagney * frame.c (legacy_get_prev_frame): Revert a frame_id_eq test, instead comparing the frame PCs. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4c3ec8f591c..a0eb7ff3a07 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2003-04-03 Andrew Cagney + + * frame.c (legacy_get_prev_frame): Revert a frame_id_eq test, + instead comparing the frame PCs. + 2003-04-03 Andrew Cagney * frame.c (frame_id_eq): Update. Compare function addresses. diff --git a/gdb/frame.c b/gdb/frame.c index fecb48949e6..8e42f589000 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -1415,8 +1415,10 @@ legacy_get_prev_frame (struct frame_info *this_frame) check this in DEPRECATED_FRAME_CHAIN or thereabouts, but it seems like there is no reason this can't be an architecture-independent check. */ - if (this_frame->level > 0 - && frame_id_eq (get_frame_id (prev), get_frame_id (this_frame))) + /* NOTE: cagney/2003-04-04: Don't convert this to frame_id_eq. At + this stage the ID's address is not valid, so need to use the pc. */ + if (prev->id.stack_addr == this_frame->id.stack_addr + && get_frame_pc (prev) == get_frame_pc (this_frame)) { this_frame->prev = NULL; obstack_free (&frame_cache_obstack, prev);