From d741b867bb66a2034e5462fa90f42cc3c349709e Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Fri, 15 Nov 2002 20:55:45 +0000 Subject: [PATCH] 2002-11-15 Andrew Cagney * complaints.h: Add comment explaining how to eliminate a deprecated_complain call. --- gdb/ChangeLog | 5 +++++ gdb/complaints.h | 20 ++++++++++++++++---- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index cddda95f7a8..4a8b11e3f01 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2002-11-15 Andrew Cagney + + * complaints.h: Add comment explaining how to eliminate a + deprecated_complain call. + 2002-11-15 David Carlton * printcmd.c: Remove #include "disasm.h". diff --git a/gdb/complaints.h b/gdb/complaints.h index 159dcd13bce..f43feb0fc6a 100644 --- a/gdb/complaints.h +++ b/gdb/complaints.h @@ -53,12 +53,24 @@ extern void clear_complaints (struct complaints **complaints, /* 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. -- 2.30.2