This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH] GDB friendly assert
- To: Mark Kettenis <kettenis at wins dot uva dot nl>, gdb-patches at sourceware dot cygnus dot com
- Subject: Re: [PATCH] GDB friendly assert
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Thu, 01 Mar 2001 12:04:09 -0500
- References: <200009031729.e83HTgg00915@delius.kettenis.local> <39F584B7.A87D796F@cygnus.com> <200010241526.e9OFQJK06503@debye.wins.uva.nl> <3A06976F.DFB0F373@cygnus.com>
Andrew Cagney wrote:
>
> Mark Kettenis wrote:
> >
> > Date: Tue, 24 Oct 2000 23:46:47 +1100
> > From: Andrew Cagney <ac131313@cygnus.com>
> >
> > Thanks! Good move.
> >
> > My only (A.R.) thought is to make the macro upper case so it is very
> > clear to developers that they are using a MACRO and not a function.
> >
> > Hmm, my idea was that it simply is the standard assert() (which
> > typically is a macro) with gdb_ prepended.
>
> Yes, I know. I'm trying to trade off ``MACRO's are upper case'' against
> ``assert()'' in lower-case is more consistent with STDC even if it was a
> bad idea.
>
> > But if you feel it should
> > be changed into GDB_ASSERT, I'll be happy to change it.
>
> I don't know :-)
To close this, I'm going to add a comment to "gdb_assert.h" noting that
there is a tradeoff between these two. lcase was chosen as it is closer
to the existing UNIX convention.
As a btw, people adding new code may want to use gdb_assert() in
preference to internal error. It is shorter and more convenient.
Andrew