Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Doug Evans <dje@google.com>
Cc: gdb-patches@sourceware.org, tromey@redhat.com, palves@redhat.com
Subject: Re: [RFA] Fix inconsistency in blockvector addrmap vs non-addrmap handling
Date: Wed, 06 Jun 2012 15:54:00 -0000	[thread overview]
Message-ID: <20120606155411.GA5691@host2.jankratochvil.net> (raw)
In-Reply-To: <20120605011446.670FD1E123B@ruffy2.mtv.corp.google.com>

On Tue, 05 Jun 2012 03:14:46 +0200, Doug Evans wrote:
> 2012-06-04  Doug Evans  <dje@google.com>
> 
> 	* buildsym.c (end_symtab): Add the range of the static block to
> 	the pending addrmap.
> 
> Index: buildsym.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/buildsym.c,v
> retrieving revision 1.97
> diff -u -p -r1.97 buildsym.c
> --- buildsym.c	29 May 2012 20:23:17 -0000	1.97
> +++ buildsym.c	5 Jun 2012 00:26:01 -0000
> @@ -1024,8 +1027,15 @@ end_symtab (CORE_ADDR end_addr, struct o
>      {
>        /* Define the STATIC_BLOCK & GLOBAL_BLOCK, and build the
>           blockvector.  */
> -      finish_block (0, &file_symbols, 0, last_source_start_addr,
> -		    end_addr, objfile);
> +      struct block *static_block;
> +
> +      static_block = finish_block (0, &file_symbols, 0,
> +				   last_source_start_addr, end_addr,
> +				   objfile);
> +      /* Mark the range of the static block so that if we end up using
> +	 blockvector.map then find_block_in_blockvector behaves identically
> +	 regardless of whether the addrmap is present.  */
> +      record_block_range (static_block, last_source_start_addr, end_addr - 1);
>        finish_block_internal (0, &global_symbols, 0, last_source_start_addr,
>  			     end_addr, objfile, 1);

I am fine with the patch.  FYI I would extend the comment a bit:

      /* Mark the range of the static block so that if we end up using
	 blockvector.map then find_block_in_blockvector behaves identically
	 regardless of whether the addrmap is present.  That means it returns
	 this symtab even for addresses covered by compilation unit ranges but
	 not belonging to any symbol in this symtab.

	 STATIC_BLOCK is more inner than GLOBAL_BLOCK, this is the only reason
	 why choose it for LAST_SOURCE_START_ADDR..END_ADDR.  */


>        blockvector = make_blockvector (objfile);


Thanks,
Jan


  parent reply	other threads:[~2012-06-06 15:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-05  1:15 Doug Evans
2012-06-05 15:06 ` Pedro Alves
2012-06-06 15:54 ` Jan Kratochvil [this message]
2012-06-22 18:24 ` ping: " Jan Kratochvil
2012-06-22 19:36 ` Jan Kratochvil
2012-06-22 20:51   ` Doug Evans
2012-06-24 18:34     ` Jan Kratochvil
2012-06-25 11:39       ` Doug Evans
2012-07-03 12:54         ` Jan Kratochvil
2012-07-12  5:19           ` Doug Evans
2012-07-12 20:30             ` Jan Kratochvil
2012-07-13 20:28               ` [commit] " Jan Kratochvil

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=20120606155411.GA5691@host2.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    --cc=tromey@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