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 10/25] Adjust code generated by regformats/regdat.sh


On 06/12/2017 09:41 AM, Yao Qi wrote:
> regformats/regdat.sh generate some *-generated.c files when GDBserver
> is built.  Each .c file has some static variables, which are only used
> within function init_registers_XXX, like this,
> 
> static struct reg regs_i386_linux[] = {
>   { "eax", 0, 32 },
>   { "ecx", 32, 32 },
>   ...
> };
> 
> static const char *expedite_regs_i386_linux[] = { "ebp", "esp", "eip", 0 };
> static const char *xmltarget_i386_linux = "i386-linux.xml";
> 
> void
> init_registers_i386_linux (void)
> {
>   ...
> }
> 
> This patch moves these static variables' definitions to function
> init_registers_XXX, so the generated files look like this,
> 

The rationale misses stating why is this better than the status quo.
I presume this helps following patches?

Thanks,
Pedro Alves


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