From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31390 invoked by alias); 18 Jun 2002 21:38:26 -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 31370 invoked from network); 18 Jun 2002 21:38:23 -0000 Received: from unknown (HELO cygnus.com) (205.180.83.203) by sources.redhat.com with SMTP; 18 Jun 2002 21:38:23 -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 OAA22637 for ; Tue, 18 Jun 2002 14:38:23 -0700 (PDT) Received: from localhost (localhost.fidalgo.net [127.0.0.1]) by theotherone.redhat-remotie.org (Postfix) with ESMTP id A5A1BBB29C for ; Tue, 18 Jun 2002 14:37:53 -0700 (PDT) Date: Tue, 18 Jun 2002 14:38:00 -0000 From: Don Howard X-X-Sender: To: Subject: [patch] Use value_at_lazy() when dereferencing type int expressions Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2002-06/txt/msg00339.txt.bz2 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