This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v3 6/8] Create xml from target descriptions
- From: Alan Hayward <Alan dot Hayward at arm dot com>
- To: Philipp Rudo <prudo at linux dot vnet dot ibm dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, nd <nd at arm dot com>
- Date: Wed, 14 Mar 2018 10:09:38 +0000
- Subject: Re: [PATCH v3 6/8] Create xml from target descriptions
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alan dot Hayward at arm dot com;
- Nodisclaimer: True
- References: <757A8B89-2EF0-46BD-BAA6-6E668538B17F@arm.com> <A3E98665-3DBD-42F4-B453-B365ED1AE7AB@arm.com> <20180313190516.7f0b6443@ThinkPad>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
> 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.