This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [rfc] add __FILE__ and __LINE__ to internal_error()


>>>>> "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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]