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 v3 6/8] Create xml from target descriptions



> On 13 Mar 2018, at 18:05, Philipp Rudo <prudo@linux.vnet.ibm.com> wrote:
> 
> Hi Alan,
> 
> On Thu, 1 Mar 2018 11:41:04 +0000
> Alan Hayward <Alan.Hayward@arm.com> wrote:
> 
> [...]
> 
>> diff --git a/gdb/common/tdesc.c b/gdb/common/tdesc.c
>> index 115e7cd77942b86dedced946773d1d71950e2bb3..ce5b89045c48c65ac4c6c48f6646f8d5c6ce9d8b 100644
>> --- a/gdb/common/tdesc.c
>> +++ b/gdb/common/tdesc.c
>> @@ -288,4 +288,158 @@ tdesc_add_enum_value (tdesc_type_with_fields *type, int value,
> 
> [...]
> 
>> +void print_xml_feature::visit (const tdesc_reg *reg)
>> +{
>> +  *m_buffer += "<reg name=\"";
>> +  *m_buffer += reg->name;
>> +  *m_buffer += "\" bitsize=\"";
>> +  *m_buffer += std::to_string (reg->bitsize);
>> +  *m_buffer += "\" type=\"";
>> +  *m_buffer += reg->type;
>> +  *m_buffer += "\" regnum=\"";
>> +  *m_buffer += std::to_string (reg->target_regnum);
>> +  if (reg->group.length () > 0)
>> +    {
>> +      *m_buffer += "\" group=\"";
>> +      *m_buffer += reg->group;
>> +    }
>> +  *m_buffer += "\"/>\n";
>> +}
> 
> in the xml you can also set if an register is gets save_resore, i.e 
> 
> if (!reg->save_restore)
>  *m_buffer += "\" save-restore=\"no”;

A special 390 flag :)
I’ll double check make sure I haven’t missed any other flags too.


> 
> [...]
> 
>> diff --git a/gdb/regformats/regdat.sh b/gdb/regformats/regdat.sh
>> index 8c6e191596350fb4e983f8736985d9832f41e2d3..e6e06bdab0bdecc579686f3525e9f93555e0dd83 100755
>> --- a/gdb/regformats/regdat.sh
>> +++ b/gdb/regformats/regdat.sh
>> @@ -180,7 +180,6 @@ echo
>> cat <<EOF
>> #ifndef IN_PROCESS_AGENT
>>   result->expedite_regs = expedite_regs_${name};
>> -  result->xmltarget = xmltarget_${name};
>> #endif
>> 
>>   init_target_desc (result);
> 
> This hunk caused all the test cases in gdb.server to fail.  Removing it 'fixed'
> it for me.  Although i cannot tell you what went wrong.
> 

I suspect this is an old style vs new style target descriptions issue.
I’ve found myself an Arm 32 box and potentially a PPC box too - hoping I can recreate the issue on one of them.

Thanks for narrowing it down to this.


Alan.



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