From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21432 invoked by alias); 5 Dec 2004 19:12:13 -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 21401 invoked from network); 5 Dec 2004 19:12:09 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 5 Dec 2004 19:12:09 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1Cb1nU-0005Lp-80; Sun, 05 Dec 2004 14:11:52 -0500 Date: Sun, 05 Dec 2004 19:37:00 -0000 From: Daniel Jacobowitz To: Ramana Radhakrishnan Cc: gdb-patches@sources.redhat.com, cagney@gnu.org, dk@artimi.org Subject: Re: [PATCH] Fix for PR exp/1821 Message-ID: <20041205191152.GA20357@nevyn.them.org> Mail-Followup-To: Ramana Radhakrishnan , gdb-patches@sources.redhat.com, cagney@gnu.org, dk@artimi.org References: <41B35793.5010602@codito.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41B35793.5010602@codito.com> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-12/txt/msg00132.txt.bz2 On Mon, Dec 06, 2004 at 12:16:43AM +0530, Ramana Radhakrishnan wrote: > Hi , > > I was looking at PR 1821 today and realized that the problem is because > cplus_print_value_fields is shared between c-valprint.c and > cp-valprint.c . fprintf_symbol_filtered is called with language_cplus > automatically while it should be dependent on the current language . > > > This patch attempts to use current_language->la_language to pass to > fprintf_symbol_filtered so that the correct demangler is used. Tested > with i686-pc-linux-gnu using gcc 3.3.4 (Debian) and no extra regressions. > > Ok to commit ? Yes, this is OK, with a couple of formatting corrections (see below). Do you think you could add a testcase for this problem? > ChangeLog: > > 2004-12-06 Ramana Radhakrishnan > > Fix PR exp/1821 > * cp-valprint.c(cp_print_value_fields): Pass current language to > fprintf_symbol_filtered. Please be careful of tabs and spaces. > Index: cp-valprint.c > =================================================================== > RCS file: /cvs/src/src/gdb/cp-valprint.c,v > retrieving revision 1.27 > diff -c -3 -p -r1.27 cp-valprint.c > *** cp-valprint.c 12 Nov 2004 21:45:06 -0000 1.27 > --- cp-valprint.c 5 Dec 2004 18:23:27 -0000 > *************** > *** 35,41 **** > #include "target.h" > #include "cp-abi.h" > #include "valprint.h" > ! > int vtblprint; /* Controls printing of vtbl's */ > int objectprint; /* Controls looking up an object's derived type > using what we find in its vtables. */ > --- 35,41 ---- > #include "target.h" > #include "cp-abi.h" > #include "valprint.h" > ! #include "language.h" > int vtblprint; /* Controls printing of vtbl's */ > int objectprint; /* Controls looking up an object's derived type > using what we find in its vtables. */ Please leave a blank line here. -- Daniel Jacobowitz