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: Doug Evans <dje at google dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: gdb-patches <gdb-patches at sourceware dot org>
- Date: Fri, 7 Nov 2014 08:54:20 -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>
On Tue, Nov 4, 2014 at 5:49 PM, Yao Qi <yao@codesourcery.com> wrote:
> Doug Evans <dje@google.com> writes:
>
> Doug,
> Thanks for reviewing these patches.
>
>> IWBN if one could add new macros simply by writing a new function.
>>
>> Can _handle_macro_attribute be rewritten such that
>> MACRO_AT_{func,range} are themselves functions?
>
> I don't see any difficulties to implement MACRO_AT_{func,range} as
> functions here, but could you tell me why do you prefer to do that?
> Is it because they are macros?
I was thinking long term I'd rather maintain the individual functions
instead of one large switch statement, all else being equal, and if I
have the choice.
> After all, in dwarf assembler, all attributes are handled in a single
> function, rather than the way that each attribute is handled in the
> separate function. MACRO_AT_{func,range}, as special attributes from
> the users' point of view, should be handled in a way consistent with
> other attributes, IMO.