This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
Re: [PATCH] backends: Check type DIE exists before calling dwarf_tag ().
- From: Mark Wielaard <mjw at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Wed, 06 Feb 2013 23:33:34 +0100
- Subject: Re: [PATCH] backends: Check type DIE exists before calling dwarf_tag ().
On Wed, 2013-02-06 at 13:08 -0800, Roland McGrath wrote:
> Unconditional use of (older) GCC extensions in elfutils code is fine.
For those playing along at home, I had to admit I didn't know about the
Statement-Exprs extension:
http://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html
It is awesome!
> #define DWARF_TAG_OR_RETURN(die) \
> ({ Dwarf_Die *_die = (die); \
> if (_die == NULL) return -1; \
> dwarf_tag (_die); })
That is indeed way nicer. I used it instead.
Thanks,
Mark