[PATCH 2/6] DW attribute macro MACRO_AT_func and MACRO_AT_range

Yao Qi yao@codesourcery.com
Fri Nov 14 01:00:00 GMT 2014


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 (齐尧)



More information about the Gdb-patches mailing list