This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/2] Expand documentation of common-utils.h::FUNCTION_NAME
- From: Doug Evans <dje at google dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb-patches <gdb-patches at sourceware dot org>
- Date: Tue, 21 Jan 2014 21:20:16 -0800
- Subject: Re: [PATCH 1/2] Expand documentation of common-utils.h::FUNCTION_NAME
- Authentication-results: sourceware.org; auth=none
- References: <20140118015244 dot GA22787 at sourceware dot org> <1390300575-6998-1-git-send-email-brobecker at adacore dot com> <CADPb22Se+Wm_QvD4bk6Qby3zzOjqx6ROkr4aaKqinx_H5qdgtQ at mail dot gmail dot com> <20140122045956 dot GA4762 at adacore dot com>
On Tue, Jan 21, 2014 at 8:59 PM, Joel Brobecker <brobecker@adacore.com> wrote:
>> > gdb/ChangeLog:
>> >
>> > * common/common-utils.h (FUNCTION_NAME): Expand the macro's
>> > documentation a bit.
>> >
>> > I would commit on its own, but since I am going to put the next in
>> > for the same macro up for review, it's just as easy to make that one
>> > wait as well, in case there are comments.
>>
>> Yeah, I stumbled a bit on this myself.
>> It's not clear to me whether not defining it or defining it as NULL
>> (and update all current users to deal with that) is better but I went
>> with keeping things as they are.
>
> I almost had the same thoughts. I agree that it's just best to let
> things as they are until we have evidence that changing them would
> be beneficial. The difference is that I was thinking of defining
> FUNCTION_NAME to something like "<unknown function>" rather than NULL.
> Without more evidence, not clear which would be best...
Yeah.
The argument against <unknown function> is that maybe sometime one
would want to know if its unknown, and comparison with NULL is easier,
more maintainable than strcmp (unless "<unknown function>" was a
macro, but maybe that's overkill).