From 0bba2ddfa79b718e4bab94f2827165bd5b55c92c Mon Sep 17 00:00:00 2001 From: Martin Galvan Date: Sun, 30 Nov 2014 19:34:15 +0400 Subject: [PATCH] frame.c: Fix the check for FID_STACK_INVALID in frame_id_eq() I noticed in frame_id_eq() we were checking for the "l" frame_id being invalid twice instead of checking both "l" and "r", so this patch corrects it. gdb/ChangeLog: * frame.c (frame_id_eq): Fix the check for FID_STACK_INVALID. --- gdb/ChangeLog | 5 +++++ gdb/frame.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4112438..f706f29 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2014-11-30 Martin Galvan (tiny patch, obvious) + + Pushed by Joel Brobecker . + * frame.c (frame_id_eq): Fix the check for FID_STACK_INVALID. + 2014-11-29 Siva Chandra Reddy * eval.c (evaluate_subexp): Check that the thread stack temporaries diff --git a/gdb/frame.c b/gdb/frame.c index 0663af9..75ad341 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -614,7 +614,7 @@ frame_id_eq (struct frame_id l, struct frame_id r) outer_frame_id. */ eq = 1; else if (l.stack_status == FID_STACK_INVALID - || l.stack_status == FID_STACK_INVALID) + || r.stack_status == FID_STACK_INVALID) /* Like a NaN, if either ID is invalid, the result is false. Note that a frame ID is invalid iff it is the null frame ID. */ eq = 0; -- 1.9.1