This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [rfc] add __FILE__ and __LINE__ to internal_error()
- To: Andrew Cagney <ac131313 at cygnus dot com>
- Subject: Re: [rfc] add __FILE__ and __LINE__ to internal_error()
- From: jtc at redback dot com (J.T. Conklin)
- Date: 04 Dec 2000 11:34:19 -0800
- Cc: GDB Patches <gdb-patches at sourceware dot cygnus dot com>
- References: <3A2789DD.ABA82A16@cygnus.com>
- Reply-To: jtc at redback dot com
>>>>> "Andrew" == Andrew Cagney <ac131313@cygnus.com> writes:
Andrew> This is part one of a two step process to completly eliminate all
Andrew> remaining abort() calls in GDB.
Andrew> Part two involves replacing abort() with ``internal_error (__FILE__,
Andrew> __LINE__, "legacy call to abort()");''.
Andrew>
Andrew> Look ok?
While I can appreciate the need to uniquely identify a specific call
to internal_error(), one thing I don't care for is how __FILE__ and
__LINE__ are added to each call. I think it clutters things up more
than is necessary.
Unfortunately, without requiring gcc or C9X, we can't use macros with
variable argument lists. Otherwise, I would recommend that internal-
error() and internal_verror() be macros that expand __FILE__ and __LINE__
before calling "real" functions under the hood.
So given that there aren't really any viable alternatives, I'm OK with
this.
--jtc
--
J.T. Conklin
RedBack Networks