From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28601 invoked by alias); 18 Jun 2002 22:33:22 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 28558 invoked from network); 18 Jun 2002 22:33:17 -0000 Received: from unknown (HELO cygnus.com) (205.180.83.203) by sources.redhat.com with SMTP; 18 Jun 2002 22:33:17 -0000 Received: from theotherone.redhat-remotie.org (romulus.sfbay.redhat.com [172.16.27.251]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id PAA27466 for ; Tue, 18 Jun 2002 15:33:16 -0700 (PDT) Received: from localhost (localhost.fidalgo.net [127.0.0.1]) by theotherone.redhat-remotie.org (Postfix) with ESMTP id 9472FBB29C for ; Tue, 18 Jun 2002 15:32:46 -0700 (PDT) Date: Tue, 18 Jun 2002 15:33:00 -0000 From: Don Howard X-X-Sender: To: Subject: Re: [patch] Use value_at_lazy() when dereferencing type int expressions In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2002-06/txt/msg00348.txt.bz2 I forgot to give credit to Jim Blandy for suggesting this solution. 2002-06-18 Don Howard * valops.c (value_ind): Use value_at_lazy() when dereferencing type int expressions. Thanks to Jim Blandy for suggesting this solution. On Tue, 18 Jun 2002, Don Howard wrote: > > > The following allows gdb expressions like > > set *YYYY = zzzz > > to be evaluated without reading target memory at *YYYY. > > No testsuite regressions on x86 linux. > > > 2002-06-18 Don Howard > > * valops.c (value_ind): Use value_at_lazy() when dereferencing > type int expressions. > > Index: valops.c > =================================================================== > RCS file: /cvs/src/src/gdb/valops.c,v > retrieving revision 1.60 > diff -p -u -w -r1.60 valops.c > --- valops.c 14 Jun 2002 14:34:26 -0000 1.60 > +++ valops.c 18 Jun 2002 21:28:52 -0000 > @@ -961,7 +961,7 @@ value_ind (struct value *arg1) > to do. "long long" variables are rare enough that > BUILTIN_TYPE_LONGEST would seem to be a mistake. */ > if (TYPE_CODE (base_type) == TYPE_CODE_INT) > - return value_at (builtin_type_int, > + return value_at_lazy (builtin_type_int, > (CORE_ADDR) value_as_long (arg1), > VALUE_BFD_SECTION (arg1)); > else if (TYPE_CODE (base_type) == TYPE_CODE_PTR) > > -- dhoward@redhat.com gdb engineering