From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15158 invoked by alias); 13 Dec 2013 08:04: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 15147 invoked by uid 89); 13 Dec 2013 08:04:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mga14.intel.com Received: from mga14.intel.com (HELO mga14.intel.com) (143.182.124.37) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 13 Dec 2013 08:04:17 +0000 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by azsmga102.ch.intel.com with ESMTP; 13 Dec 2013 00:04:14 -0800 X-ExtLoop1: 1 Received: from irsmsx103.ger.corp.intel.com ([163.33.3.157]) by fmsmga001.fm.intel.com with ESMTP; 13 Dec 2013 00:04:12 -0800 Received: from irsmsx104.ger.corp.intel.com ([169.254.5.135]) by IRSMSX103.ger.corp.intel.com ([169.254.3.66]) with mapi id 14.03.0123.003; Fri, 13 Dec 2013 08:04:12 +0000 From: "Metzger, Markus T" To: Jan Kratochvil , Pedro Alves CC: "gdb-patches@sourceware.org" Subject: RE: [patch v8 05/24] frame: artificial frame id's Date: Fri, 13 Dec 2013 08:04:00 -0000 Message-ID: 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> In-Reply-To: <20131212195531.GA6092@host2.jankratochvil.net> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2013-12/txt/msg00519.txt.bz2 > -----Original Message----- > From: Jan Kratochvil [mailto:jan.kratochvil@redhat.com] > Sent: Thursday, December 12, 2013 8:56 PM Thanks for your feedback, Pedro. Jan already answered some of your questions. [...] > > Looks like frame_ id_eq (null_frame_id, null_frame_id) now > > returns true, while it returns false before. If you discussed > > all this and came to the conclusion it's OK, please document > > it in the commit log. In any case (I'm not sure offhand if > > that's OK), the NaN comment above is no longer correct, > > and neither is this one: >=20 > That was not needed / intentional so it would be better to keep the origi= nal > behavior. 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; =20 - if (memcmp (&l, &r, sizeof (l)) =3D=3D 0) - /* Every frame is equal to itself. + if (memcmp (&l, &null_frame_id, sizeof (l)) =3D=3D 0 + || memcmp (&r, &null_frame_id, sizeof (r)) =3D=3D 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 =3D 0; + else if (memcmp (&l, &r, sizeof (l)) =3D=3D 0) + /* Every valid frame is equal to itself. This is the dodgy thing about outer_frame_id, since between executi= on steps we might step into another function - from which we can't unw= ind either. More thought required to get rid of outer_frame_id. */ eq =3D 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 =3D 0; else if (l.stack_addr !=3D r.stack_addr) /* If .stack addresses are different, the frames are different. */ eq =3D 0; Regards, Markus. Intel GmbH Dornacher Strasse 1 85622 Feldkirchen/Muenchen, Deutschland Sitz der Gesellschaft: Feldkirchen bei Muenchen Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk Registergericht: Muenchen HRB 47456 Ust.-IdNr./VAT Registration No.: DE129385895 Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052