Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: "Metzger, Markus T" <markus.t.metzger@intel.com>,
	       Mark Wielaard <mjw@redhat.com>,
	Cary Coutant <ccoutant@google.com>,
	       Doug Evans <dje@google.com>,
	gdb-patches@sourceware.org,        binutils@sourceware.org
Subject: Re: vdso handling
Date: Tue, 01 Apr 2014 13:46:00 -0000	[thread overview]
Message-ID: <533AC33E.8030700@redhat.com> (raw)
In-Reply-To: <20140328230037.GW18201@bubble.grove.modra.org>

On 03/28/2014 11:00 PM, Alan Modra wrote:

> I believe the intent of rounding to a page was to pick up the file
> and program headers at the start of a file and section headers at the
> end, so let's do just that.  On top of my last patch:

Agreed.  This works for me.  Thanks!

> -	if (i_phdrs[i].p_align > 1)
> +	/* Extend the beginning of the first pt_load to cover file
> +	   header and program headers.  */
> +	if (first_phdr == &i_phdrs[i])

Minor nit:  Perhaps the comment could say "first pt_load
if it covers offset 0"?  The computation below confused me a little
until I scrolled up and realized that first_phdr is only set if
the first segment covers offset 0, not whatever the first segment
is.  (I'd even consider renaming it to zero_phdr or
zero_offset_phdr, but with the comment I'd already be
super happy).


On the GDB patch, sorry for not noticing earlier, but:

> +static int
> +find_vdso_size (CORE_ADDR vaddr, unsigned long size,
> +		int read ATTRIBUTE_UNUSED, int write ATTRIBUTE_UNUSED,
> +		int exec ATTRIBUTE_UNUSED, int modified ATTRIBUTE_UNUSED,
> +		void *data)
> +{

Please don't use ATTRIBUTE_UNUSED under gdb/, it'd be flagged by the
ARI as a regression:

gdb/contrib/gdb_ari.sh:

BEGIN { doc["ATTRIBUTE_UNUSED"] = "\
Do not use ATTRIBUTE_UNUSED, do not bother (GDB is compiled with -Werror and, \
consequently, is not able to tolerate false warnings.  Since -Wunused-param \
produces such warnings, neither that warning flag nor ATTRIBUTE_UNUSED \
are used by GDB"
    category["ATTRIBUTE_UNUSED"] = ari_regression
}
/(^|[^_[:alnum:]])ATTRIBUTE_UNUSED([^_[:alnum:]]|$)/ {
    fail("ATTRIBUTE_UNUSED")
}

-- 
Pedro Alves


  reply	other threads:[~2014-04-01 13:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20140313130322.GA3384@bubble.grove.modra.org>
     [not found] ` <5321C7C8.6000707@redhat.com>
     [not found]   ` <5321C8FA.40708@gmail.com>
     [not found]     ` <5321CE1A.20509@redhat.com>
     [not found]       ` <20140313235347.GD3384@bubble.grove.modra.org>
     [not found]         ` <A78C989F6D9628469189715575E55B230AAB6B17@IRSMSX103.ger.corp.intel.com>
     [not found]           ` <20140318230939.GA9145@bubble.grove.modra.org>
     [not found]             ` <5329879C.6070805@redhat.com>
     [not found]               ` <20140320013305.GA13347@bubble.grove.modra.org>
     [not found]                 ` <532C5F60.80700@redhat.com>
2014-03-28  6:13                   ` Alan Modra
2014-03-28 13:38                     ` Pedro Alves
2014-03-28 23:00                       ` Alan Modra
2014-04-01 13:46                         ` Pedro Alves [this message]
2014-04-02  1:50                           ` Alan Modra
2014-04-02  8:05                             ` Metzger, Markus T
2014-04-02  8:04                     ` Hans-Peter Nilsson
2014-04-03  1:06                       ` Alan Modra
2014-04-03  1:46                         ` Alan Modra

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=533AC33E.8030700@redhat.com \
    --to=palves@redhat.com \
    --cc=binutils@sourceware.org \
    --cc=ccoutant@google.com \
    --cc=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    --cc=markus.t.metzger@intel.com \
    --cc=mjw@redhat.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