From: Alan Hayward <Alan.Hayward@arm.com>
To: Yao Qi <qiyaoltc@gmail.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
nd <nd@arm.com>
Subject: Re: [PATCH 3/6] : Update dat files with arch and osabi
Date: Mon, 22 Jan 2018 13:22:00 -0000 [thread overview]
Message-ID: <6D4AA708-D4CE-42E6-8D84-54E6B292DB0B@arm.com> (raw)
In-Reply-To: <CAH=s-PMSHD2zYqN2ZgQBzNiVOg2=h_OreO4et054=PGTqRg1_w@mail.gmail.com>
> On 19 Jan 2018, at 22:01, Yao Qi <qiyaoltc@gmail.com> wrote:
>
> On Tue, Jan 16, 2018 at 9:52 AM, Alan Hayward <Alan.Hayward@arm.com> wrote:
>> This patch simply ensures the osabi and arch fields exist in the dat
>> files. Otherwise, they will be missing in later patches when gdbserver
>> converts target descriptions to xml.
>
> I don't think we need to change *.dat. *.dat are used to generate *.c files
> in gdbserver build directory for the following two reasons,
>
> - the port isn't converted to new style flexible target descriptions yet,
> - or the generated *.c files are used for test,
>
> The goal of this series, IMO, is to get rid of the xml features for the ports
> which already use new style flexible target descriptions, like x86
> and aarch64.
>
> For the old style target description, they still use xml files for each
> description, and osabi/arch is written in these xml files.
>
If you remove this patch, but keep all the rest of the series, then the ports
using the new style target descriptions will segfault when printing the xml
in print_xml_feature::visit_pre() because the -generated.c files do not
contain an arch or osabi.
The segfault happens on gdbserver init because the -generated.c functions
are calling tdesc_get_features_xml().
Thinking about it, I will remove this call from -generated.
That fixes the bug.
This leaves a question:
Is it required that the generated target descriptions have the osabi and arch?
If it does not need this information, then I will delete this patch.
Alan.
next prev parent reply other threads:[~2018-01-22 13:22 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-16 9:52 [PATCH 0/6] : Remove XML files from gdbserver Alan Hayward
2018-01-16 9:51 ` [PATCH 1/6] : Commonise various target-descriptions.c functions Alan Hayward
2018-01-16 14:18 ` Alan Hayward
2018-01-19 23:05 ` Yao Qi
2018-01-22 14:06 ` Alan Hayward
2018-01-22 15:47 ` Yao Qi
2018-01-16 9:52 ` [PATCH 2/6]: gdbserver use common tdesc functions Alan Hayward
2018-01-16 9:53 ` [PATCH 3/6] : Update dat files with arch and osabi Alan Hayward
2018-01-19 22:01 ` Yao Qi
2018-01-22 13:22 ` Alan Hayward [this message]
2018-01-22 15:28 ` Yao Qi
2018-01-16 9:55 ` [PATCH 5/6] : Remove xml file references from target descriptions Alan Hayward
2018-01-16 9:55 ` [PATCH 6/6]: Remove xml files from gdbserver Alan Hayward
2018-01-19 22:11 ` Yao Qi
2018-01-22 13:23 ` Alan Hayward
2018-01-22 14:52 ` Yao Qi
2018-01-16 9:55 ` [PATCH 4/6]: Create xml from target descriptions Alan Hayward
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6D4AA708-D4CE-42E6-8D84-54E6B292DB0B@arm.com \
--to=alan.hayward@arm.com \
--cc=gdb-patches@sourceware.org \
--cc=nd@arm.com \
--cc=qiyaoltc@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox