Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <yao@codesourcery.com>
To: Jiong Wang <jiwang@tilera.com>
Cc: Joel Brobecker <brobecker@adacore.com>,
	<gdb-patches@sourceware.org>,	Walter Lee <walt@tilera.com>
Subject: Re: [RFC/TileGX 2/6] simplify the handling of skip prologue for plt stub
Date: Wed, 20 Feb 2013 04:11:00 -0000	[thread overview]
Message-ID: <51244CBA.4000009@codesourcery.com> (raw)
In-Reply-To: <51243991.4040304@tilera.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="gb18030"; format=flowed, Size: 1718 bytes --]

On 02/20/2013 10:48 AM, Jiong Wang wrote:
> gdb/ChangeLog:
>
>           * tilegx-tdep.c (tilegx_skip_prologue): when prefetching
                                                    ^^^^ "When"
>           multiple instruction bundles, check section boundary
>           instead of page boundary.

Is it possible that the section layouts on two pages?  I mean, if is 
possible that NEXT_ADDR is within section FOO and page A, but the end of 
section FOO is within page A + 1.  If this is true, we need to check to 
the min (page boundary, section boundary), otherwise, we don't have to 
worry about it.

> ---
>   gdb/tilegx-tdep.c | 12 ++++++++----
>   1 files changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/gdb/tilegx-tdep.c b/gdb/tilegx-tdep.c
> index 2c4e349..f8a6255 100644
> --- a/gdb/tilegx-tdep.c
> +++ b/gdb/tilegx-tdep.c
> @@ -424,15 +424,18 @@ tilegx_analyze_prologue (struct gdbarch* gdbarch,
>         /* Retrieve the next instruction.  */
>         if (next_addr - instbuf_start >= instbuf_size)
>   	{
> -	  /* Figure out how many bytes to fetch.  Don't span a page
> +	  /* Figure out how many bytes to fetch.  Don't span a section
>   	     boundary since that might cause an unnecessary memory
>   	     error.  */
> -	  unsigned int size_on_same_page = 4096 - (next_addr & 4095);
> +	  unsigned int size_on_same_section;
> +	  struct obj_section *s = find_pc_section(next_addr);

A space is needed between find_pc_section and "(".  A blank line is 
needed here as well.

> +	  gdb_assert(s != NULL);
A space is needed between gdb_assert and "(".

I have no other comments on this patch.  It looks good now, but it still 
needs a review and approval from maintainers.

-- 
Yao (ÆëÒ¢)


  reply	other threads:[~2013-02-20  4:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-18  9:25 Jiong Wang
2013-01-18 13:15 ` Joel Brobecker
2013-01-18 15:12   ` Jiong Wang
2013-01-18 17:30     ` Pedro Alves
2013-02-15  3:22       ` Jiong Wang
2013-02-16  4:50     ` Yao Qi
2013-02-20  2:49       ` Jiong Wang
2013-02-20  4:11         ` Yao Qi [this message]
2013-02-21 13:40           ` Jiong Wang
2013-03-01 10:35             ` Jiong Wang
2013-03-01 11:31             ` Pedro Alves
2013-03-01 14:08               ` Jiong Wang
2013-03-01 15:59                 ` Pedro Alves
2013-03-02  1:40                   ` [COMMITTED][RFC/TileGX " Jiong Wang

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=51244CBA.4000009@codesourcery.com \
    --to=yao@codesourcery.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jiwang@tilera.com \
    --cc=walt@tilera.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