This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/6] DW attribute macro MACRO_AT_func and MACRO_AT_range
- From: Yao Qi <yao at codesourcery dot com>
- To: Doug Evans <dje at google dot com>
- Cc: gdb-patches <gdb-patches at sourceware dot org>
- Date: Fri, 14 Nov 2014 08:59:54 +0800
- Subject: Re: [PATCH 2/6] DW attribute macro MACRO_AT_func and MACRO_AT_range
- Authentication-results: sourceware.org; auth=none
- References: <1414195968-3333-1-git-send-email-yao at codesourcery dot com> <1414195968-3333-3-git-send-email-yao at codesourcery dot com> <21593 dot 22575 dot 941029 dot 980760 at ruffy2 dot mtv dot corp dot google dot com> <87fvdypgap dot fsf at codesourcery dot com> <CADPb22TSAFyEY1VNghhXmL3P27_o0OPPWS0jYSdAvJGS1jE7gg at mail dot gmail dot com> <87k333izfm dot fsf at codesourcery dot com> <CADPb22R5C7Gr_LtM8z=FfzxnYmvcDYN8=rr2gY-1asEYY3Wqug at mail dot gmail dot com> <87fvdqijal dot fsf at codesourcery dot com> <CADPb22SbzjR7=UA6BLkHUJe5Gir3o5EzrHeKo=dJ0jzf9bKNMw at mail dot gmail dot com>
Doug Evans <dje@google.com> writes:
Hi Doug,
> The sequence of ifs to test for each macro name is akin to the switch
> statement we removed.
> It's less code of course, but it still involves continual additions
> for each new macro.
> I was thinking of still having a wrapper function that checks for macros,
> but it could do "info proc _handle_$attr_name" or some such and
> call(via eval?) the function if it exists or flag an error if it
> doesn't. We don't have to go down this road though until we need to.
Yeah, that is a very clear trick. I'll adapt the code for it when new
macro attribute is added later.
Thanks for your review, and this series is pushed in.
--
Yao (éå)