public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Abdul Basit Ijaz via Gdb-patches <gdb-patches@sourceware.org>
Cc: Abdul Basit Ijaz <abdul.b.ijaz@intel.com>,
	 simark@simark.ca, tom@tromey.com
Subject: Re: [PATCH v3 3/4] gdb, intel-classic-compilers, testsuite: workaround icc/icpc/ifort pointer/reference DWARF
Date: Tue, 10 Oct 2023 13:52:42 -0600	[thread overview]
Message-ID: <87pm1mtfud.fsf@tromey.com> (raw)
In-Reply-To: <20230904222956.15203-4-abdul.b.ijaz@intel.com> (Abdul Basit Ijaz via Gdb-patches's message of "Tue, 5 Sep 2023 00:29:55 +0200")

>>>>> Abdul Basit Ijaz via Gdb-patches <gdb-patches@sourceware.org> writes:

> +bool
> +icc_pointer_or_reference_type (const struct type *type)
> +{
> +  return (type->code () == TYPE_CODE_PTR || type->code () == TYPE_CODE_REF)
> +	 && type->is_objfile_owned ()
> +	 && std::any_of (type->objfile_owner ()->compunits ().begin (),
> +			 type->objfile_owner ()->compunits ().end (),
> +			 [] (const compunit_symtab *cu)
> +			 {
> +			   return producer_is_icc (cu->producer (), nullptr,
> +						   nullptr);
> +			 });
> +}

It seems to me that it would be better to do this kind of checking when
reading the DWARF.  That way it could be targeted to exactly types in
ICC CUs, and it would avoid putting ICC workarounds into generic code --
the workarounds would be confined to the DWARF reader.

Tom

  parent reply	other threads:[~2023-10-10 19:52 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-04 22:29 [PATCH v3 0/4] Dynamic properties of pointers Abdul Basit Ijaz
2023-09-04 22:29 ` [PATCH v3 1/4] gdb, testsuite: handle icc and icpc deprecated remarks Abdul Basit Ijaz
2023-10-03  0:04   ` Thiago Jung Bauermann
2023-09-04 22:29 ` [PATCH v3 2/4] gdb, types: Resolve pointer types dynamically Abdul Basit Ijaz
2023-10-03  0:07   ` Thiago Jung Bauermann
2023-10-10 19:45     ` Tom Tromey
2024-01-03 21:06       ` Ijaz, Abdul B
2024-01-03 21:06     ` Ijaz, Abdul B
2023-10-10 19:49   ` Tom Tromey
2024-01-03 21:31     ` Ijaz, Abdul B
2023-09-04 22:29 ` [PATCH v3 3/4] gdb, intel-classic-compilers, testsuite: workaround icc/icpc/ifort pointer/reference DWARF Abdul Basit Ijaz
2023-10-03  0:09   ` Thiago Jung Bauermann
2023-10-10 19:52   ` Tom Tromey [this message]
2024-01-03 21:15     ` Ijaz, Abdul B
2023-09-04 22:29 ` [PATCH v3 4/4] gdb, testsuite, fortran: Fix sizeof intrinsic for ifort Fortran pointers Abdul Basit Ijaz
2023-10-03  0:16   ` Thiago Jung Bauermann
2023-09-27 21:11 ` [PING][PATCH v3 0/4] Dynamic properties of pointers Ijaz, Abdul B
2023-10-03  0:17 ` [PATCH " Thiago Jung Bauermann

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=87pm1mtfud.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=abdul.b.ijaz@intel.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simark@simark.ca \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).