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 07/25] Lazily and dynamically create i386-linux target descriptions


On 06/20/2017 03:07 PM, Yao Qi wrote:
> Pedro Alves <palves@redhat.com> writes:

>> Can you say something about the "regnum = %ld" change?  Is it
>> related to the rest of the patch?
>>

...

> Some reg in XML target description has attribute "regnum" which set the
> register number explicitly rather than using the sequentially allocated
> number,
> 
>   <reg name="xmm0" bitsize="128" type="vec128" regnum="32"/>
> 
> In order to handle this, this patch also changes the visitor to print
> the code to set regnum when reg has attribute "regnum".

I see.

   void visit (const tdesc_reg *reg) override
   {
+    if (reg->target_regnum > next_regnum)
+      {
+	printf_unfiltered ("  regnum = %ld;\n", reg->target_regnum);
+	next_regnum = reg->target_regnum;
+      }

I guess "reg->target_regnum < next_regnum" shouldn't ever
happen, right?  Should we add an assert?

Thanks,
Pedro Alves


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