This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Make target_ops->to_has_FOO functions instead of variables.


>>>>> "Pedro" == Pedro Alves <pedro@codesourcery.com> writes:

Pedro> The patch below addresses this, by rewriting the target_has_FOO
Pedro> properties as methods, so that they can return a different
Pedro> result depending on the current inferior/program.

Everything in there that I understand seems reasonable to me.

Pedro> +extern int target_has_all_memory_1 (void);
Pedro> +#define target_has_all_memory target_has_all_memory_1 ()

What do you think of a mechanical follow-up patch that changes
"target_has_*" to "target_has_* ()"?

I generally prefer to avoid object-like macros that expand to function
calls, as I think they obscure the meaning of the code.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]