Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Shahab Vahedi <shahab.vahedi@gmail.com>, gdb-patches@sourceware.org
Cc: Shahab Vahedi <shahab@synopsys.com>,
	Anton Kolesov <anton.kolesov@synopsys.com>,
	Francois Bedard <fbedard@synopsys.com>
Subject: Re: [PATCH v2] arc: Migrate to new target features
Date: Sat, 7 Mar 2020 23:16:46 -0500	[thread overview]
Message-ID: <f4419da2-24ee-4a07-4952-a78a90b8199a@simark.ca> (raw)
In-Reply-To: <20200307235422.13489-1-shahab.vahedi@gmail.com>

On 2020-03-07 6:54 p.m., Shahab Vahedi wrote:
> From: Anton Kolesov <Anton.Kolesov@synopsys.com>
> 
> This patch replaces usage of target descriptions in ARC, where the whole
> description is fixed in XML, with new target descriptions where XML describes
> individual features, and GDB assembles those features into actual target
> description.

Hi Shahab,

The patch is ok, with the nit below fixed.

Also, I remembered that other architectures that use feature-based target descriptions
cache the target descriptions, such that if you request a tdesc with the same features
twice, the exact same instance is returned.  See for example:

- amd64_linux_read_description
- arm_read_description

I can't remember if this is just a simple optimization or if it's actually required...

> diff --git a/gdb/arch/arc.h b/gdb/arch/arc.h
> new file mode 100644
> index 00000000000..dc7871c3103
> --- /dev/null
> +++ b/gdb/arch/arc.h
> @@ -0,0 +1,20 @@
> +/* Copyright (C) 2017-2020 Free Software Foundation, Inc.
> +
> +   This file is part of GDB.
> +
> +   This program is free software; you can redistribute it and/or modify
> +   it under the terms of the GNU General Public License as published by
> +   the Free Software Foundation; either version 3 of the License, or
> +   (at your option) any later version.
> +
> +   This program is distributed in the hope that it will be useful,
> +   but WITHOUT ANY WARRANTY; without even the implied warranty of
> +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +   GNU General Public License for more details.
> +
> +   You should have received a copy of the GNU General Public License
> +   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
> +
> +#include "gdbsupport/tdesc.h"
> +
> +target_desc *arc_create_target_description (bool print_debug, bool is_arcv2);

This file (arc.h) is missing include guards.

Simon


  reply	other threads:[~2020-03-08  4:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-05 16:06 [PATCH] " Shahab Vahedi
2020-03-05 23:06 ` Simon Marchi
2020-03-07 23:54 ` [PATCH v2] " Shahab Vahedi
2020-03-08  4:16   ` Simon Marchi [this message]
2020-03-13 10:37 ` [PATCH v3] " Shahab Vahedi
2020-03-13 13:49   ` Simon Marchi

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=f4419da2-24ee-4a07-4952-a78a90b8199a@simark.ca \
    --to=simark@simark.ca \
    --cc=anton.kolesov@synopsys.com \
    --cc=fbedard@synopsys.com \
    --cc=gdb-patches@sourceware.org \
    --cc=shahab.vahedi@gmail.com \
    --cc=shahab@synopsys.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