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: [PATCH] Move some code into get_register.


On 06/07/2013 01:43 PM, Yao Qi wrote:
> Hi,
> This is a refactor patch.  This patch moves some common code in
> caller of get_register into get_register, and rename it to
> output_register.  With this patch, the caller of output_register can
> be simplified to some extent.

Thanks.

> gdb:
> 
> 2013-06-07  Pedro Alves  <pedro@codesourcery.com>
> 	    Yao Qi  <yao@codesourcery.com>
> 
> 	* mi/mi-main.c (get_register): Remove declaration.
> 	(output_register): Declare.
> 	(mi_cmd_data_list_register_values): Remove local variable
> 	'tuple_cleanup'.  Move some code into output_register.
> 	(get_register): Renamed to ...
> 	(output_register): ... it.

s/it/this/.

Add something like:

	(output_register): ... This.  Output the register's
        "number" ui_out tuple here.

> -/* Output one register's contents in the desired format.  */
> +/* Output one register REGNUM's contents in the desired FORMAT.  */

You're naming the register now, so, s/one//.

Okay with those fixes.

Thanks!

-- 
Pedro Alves


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