From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18912 invoked by alias); 15 Nov 2002 20:57:06 -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 18902 invoked from network); 15 Nov 2002 20:57:03 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 15 Nov 2002 20:57:03 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 3651B3E4B for ; Fri, 15 Nov 2002 15:57:02 -0500 (EST) Message-ID: <3DD55F9E.3000104@redhat.com> Date: Fri, 15 Nov 2002 12:57:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.0) Gecko/20020824 X-Accept-Language: en-us, en MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: [patch] Expand comment about complain() replacement Content-Type: multipart/mixed; boundary="------------090405080904070203080906" X-SW-Source: 2002-11/txt/msg00424.txt.bz2 This is a multi-part message in MIME format. --------------090405080904070203080906 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 106 Hello, This patch just expands the description of what replaced complain() a little. committed, Andrew --------------090405080904070203080906 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 1500 2002-11-15 Andrew Cagney * complaints.h: Add comment explaining how to eliminate a deprecated_complain call. Index: complaints.h =================================================================== RCS file: /cvs/src/src/gdb/complaints.h,v retrieving revision 1.5 diff -u -r1.5 complaints.h --- complaints.h 25 Oct 2002 22:25:55 -0000 1.5 +++ complaints.h 15 Nov 2002 20:54:02 -0000 @@ -53,12 +53,24 @@ /* Deprecated interfaces to keep the old code working (until it is all converted to the above). Existing code such as: - struct deprecated_complaint msg = { "msg", 0, 0 }; - complaint (&msg); + struct deprecated_complaint msg = { "msg 0x%08x[sic]", 0, 0 }; + deprecated_complain (&msg, addr); - should be replaced by: + should be replaced by either the new call (for the singular case): - complaint (&symtab_complaints, __FILE__, __LINE__, "msg"); + complaint (&symtab_complaints, "msg 0x%s", paddr (addr)); + + or with a wrapper function (for the many-of case): + + msg_complaint (CORE_ADDR addr) + { complaint (&symtab_complaints, "msg 0x%s", paddr (addr)); } + ... + msg_complaint (addr); + + Yes, the typo is intentional. The motivation behind this interface + change is to eliminate all possability of this problem re-occuring + (it has occured in the past and no one is sure that it isn't + present now). Support for complaining about things in the symbol file that aren't catastrophic. --------------090405080904070203080906--