This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Make target_ops->to_has_FOO functions instead of variables.
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Fri, 05 Jun 2009 12:41:04 -0600
- Subject: Re: Make target_ops->to_has_FOO functions instead of variables.
- References: <200906041620.38550.pedro@codesourcery.com>
- Reply-to: tromey at redhat dot com
>>>>> "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