Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: [patch] Expand comment about complain() replacement
Date: Fri, 15 Nov 2002 12:57:00 -0000	[thread overview]
Message-ID: <3DD55F9E.3000104@redhat.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 106 bytes --]

Hello,

This patch just expands the description of what replaced complain() a 
little.

committed,
Andrew

[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 1500 bytes --]

2002-11-15  Andrew Cagney  <ac131313@redhat.com>

	* 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.

             reply	other threads:[~2002-11-15 20:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-15 12:57 Andrew Cagney [this message]
2002-11-15 13:09 ` Andrew Cagney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3DD55F9E.3000104@redhat.com \
    --to=ac131313@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox