From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6585 invoked by alias); 13 Dec 2013 11:27:19 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 6575 invoked by uid 89); 13 Dec 2013 11:27:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.1 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 13 Dec 2013 11:27:18 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rBDBREoo010746 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 13 Dec 2013 06:27:15 -0500 Received: from host2.jankratochvil.net (ovpn-116-40.ams2.redhat.com [10.36.116.40]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id rBDBRAno005326 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Fri, 13 Dec 2013 06:27:13 -0500 Date: Fri, 13 Dec 2013 11:27:00 -0000 From: Jan Kratochvil To: "Metzger, Markus T" Cc: Pedro Alves , "gdb-patches@sourceware.org" Subject: Re: [patch v8 05/24] frame: artificial frame id's Message-ID: <20131213112710.GA13936@host2.jankratochvil.net> References: <1386839747-8860-1-git-send-email-markus.t.metzger@intel.com> <1386839747-8860-6-git-send-email-markus.t.metzger@intel.com> <52AA10DD.2020506@redhat.com> <20131212195531.GA6092@host2.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2013-12/txt/msg00525.txt.bz2 On Fri, 13 Dec 2013 09:04:11 +0100, Metzger, Markus T wrote: > Would it be OK to have no frame be equal to null_frame_id? > > diff --git a/gdb/frame.c b/gdb/frame.c > index 37d780e..efda1cc 100644 > --- a/gdb/frame.c > +++ b/gdb/frame.c > @@ -577,16 +577,17 @@ frame_id_eq (struct frame_id l, struct frame_id r) > { > int eq; > > - if (memcmp (&l, &r, sizeof (l)) == 0) > - /* Every frame is equal to itself. > + if (memcmp (&l, &null_frame_id, sizeof (l)) == 0 > + || memcmp (&r, &null_frame_id, sizeof (r)) == 0) > + /* 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; > + else if (memcmp (&l, &r, sizeof (l)) == 0) > + /* Every valid frame is equal to itself. > This is the dodgy thing about outer_frame_id, since between execution > steps we might step into another function - from which we can't unwind > either. More thought required to get rid of outer_frame_id. */ > eq = 1; > - else if (!l.stack_addr_p || !r.stack_addr_p) > - /* 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; > else if (l.stack_addr != r.stack_addr) > /* If .stack addresses are different, the frames are different. */ > eq = 0; It looks OK to me. I have filed: py-finishbreakpoint.c incorrect frame_id_eq https://sourceware.org/bugzilla/show_bug.cgi?id=16324 I have found in create_sentinel_frame: /* Make the sentinel frame's ID valid, but invalid. That way all comparisons with it should fail. */ frame->this_id.p = 1; frame->this_id.value = null_frame_id; Although I haven't found any code (besides the python above) to depend on it. Jan