This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 0/3] remove overlapping allocation macros
- From: Doug Evans <dje at google dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches <gdb-patches at sourceware dot org>
- Date: Mon, 6 Jan 2014 10:14:17 -0800
- Subject: Re: [PATCH 0/3] remove overlapping allocation macros
- Authentication-results: sourceware.org; auth=none
- References: <1389029524-19907-1-git-send-email-tromey at redhat dot com>
On Mon, Jan 6, 2014 at 9:32 AM, Tom Tromey <tromey@redhat.com> wrote:
> Right now, gdb defines some allocation macros in defs.h, specifically
> XZALLOC, XMALLOC, and XCALLOC. libiberty also defines similar
> allocation macros, and gdb uses both variants.
>
> I think it's somewhat nicer if gdb uses just a single set of wrapper
> macros, and so this patch series replaces all the uses of the gdb
> macros with the corresponding macros from libiberty.
>
> Let me know what you think.
>
> Tested by rebuilding on x86-64 Fedora 18 and doing a cross build to
> mingw. It's possible therefore that there are some buglets remaining.
I'm all for the increased simplicity.
I just wish libiberty's macro naming didn't suck so badly.
[Not necessarily a fault at the time, but it sucks now. :-)]
E.g., after this series, "vec" use to have a more specific connotation,
(I could at least ignore libiberty's choice),
and I hate it when terms with good specific connotations get polluted.
There's a material downgrade in the readability of the code when
that happens.
Fortunately, I guess this will only be a temporary material downgrade,
since vec -> stl::vector soon.