From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6218 invoked by alias); 15 Sep 2009 20:47:35 -0000 Received: (qmail 6203 invoked by uid 22791); 15 Sep 2009 20:47:34 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.45.13) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 15 Sep 2009 20:47:32 +0000 Received: from wpaz5.hot.corp.google.com (wpaz5.hot.corp.google.com [172.24.198.69]) by smtp-out.google.com with ESMTP id n8FKlU1S023139 for ; Tue, 15 Sep 2009 13:47:30 -0700 Received: from pxi8 (pxi8.prod.google.com [10.243.27.8]) by wpaz5.hot.corp.google.com with ESMTP id n8FKjO5V020654 for ; Tue, 15 Sep 2009 13:47:27 -0700 Received: by pxi8 with SMTP id 8so3797731pxi.27 for ; Tue, 15 Sep 2009 13:47:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.143.27.41 with SMTP id e41mr590468wfj.218.1253047646638; Tue, 15 Sep 2009 13:47:26 -0700 (PDT) In-Reply-To: References: <20090910231912.0733A843B9@localhost> Date: Tue, 15 Sep 2009 20:47:00 -0000 Message-ID: Subject: Re: [RFC] better dwarf checking for values on the stack From: Cary Coutant To: Doug Evans Cc: Tom Tromey , gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-IsSubscribed: yes 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 X-SW-Source: 2009-09/txt/msg00491.txt.bz2 > Yeah, if we wanted to catch more cases of what's on the stack than > what's currently there does, then we need to appropriately handle the > math. =A0I explicitly left that for another day. > > dwarf2expr.c: > > =A0 =A0 =A0/* Assume the value is not in stack memory. > =A0 =A0 =A0 =A0 Code that knows otherwise sets this to 1. > =A0 =A0 =A0 =A0 Some arithmetic on stack addresses can probably be assume= d to > still > =A0 =A0 =A0 =A0 be a stack address, but we skip this complication for now. > =A0 =A0 =A0 =A0 This is just an optimization, so it's always ok to punt > =A0 =A0 =A0 =A0 and leave this as 0. =A0*/ > =A0 =A0 =A0int in_stack_memory =3D 0; > > Sound ok? Sure. -cary