Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: Simon Marchi <simon.marchi@ericsson.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 3/8] Add support for non-contiguous blocks to find_pc_partial_function
Date: Wed, 01 Aug 2018 23:40:00 -0000	[thread overview]
Message-ID: <20180801164039.400a0350@pinnacle.lan> (raw)
In-Reply-To: <b0d4910e-e6a3-a678-46a6-d0accbd5c2a1@ericsson.com>

On Tue, 31 Jul 2018 21:59:57 -0400
Simon Marchi <simon.marchi@ericsson.com> wrote:

> >  int
> >  find_pc_partial_function (CORE_ADDR pc, const char **name, CORE_ADDR *address,
> > -			  CORE_ADDR *endaddr)
> > +			  CORE_ADDR *endaddr, const struct block **block)
> >  {
> >    struct obj_section *section;
> >    struct symbol *f;
> > @@ -232,13 +223,37 @@ find_pc_partial_function (CORE_ADDR pc, const char **name, CORE_ADDR *address,
> >        f = find_pc_sect_function (mapped_pc, section);
> >        if (f != NULL
> >  	  && (msymbol.minsym == NULL
> > -	      || (BLOCK_START (SYMBOL_BLOCK_VALUE (f))
> > +	      || (BLOCK_ENTRY_PC (SYMBOL_BLOCK_VALUE (f))  
> 
> I don't understand this change, can you explain it briefly?
> 
> >  		  >= BMSYMBOL_VALUE_ADDRESS (msymbol))))  
> >  	{

A function's minimal symbol generally (maybe even always) refers to
the entry pc.  Therefore, we want to compare the block's entry pc to
the minimal symbol address instead of the block start - which might
not be the same as the entry pc.  BLOCK_START will refer to the lowest
address in all of the ranges.

I'll add a comment to the code explaining this.

Kevin


  reply	other threads:[~2018-08-01 23:40 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-26  6:32 [PATCH 0/8] Non-contiguous address range support Kevin Buettner
2018-06-26  6:42 ` [PATCH 1/8] Add block range data structure for blocks with non-contiguous address ranges Kevin Buettner
2018-08-01  1:36   ` Simon Marchi
2018-08-01 23:57     ` Kevin Buettner
2018-08-01  1:40   ` Simon Marchi
2018-06-26  6:44 ` [PATCH 2/8] Record explicit block ranges from dwarf2read.c Kevin Buettner
2018-08-01  1:41   ` Simon Marchi
2018-06-26  6:47 ` [PATCH 3/8] Add support for non-contiguous blocks to find_pc_partial_function Kevin Buettner
2018-07-19 18:52   ` Kevin Buettner
2018-08-01  2:01     ` Simon Marchi
2018-08-01 23:40       ` Kevin Buettner [this message]
2018-06-26  6:49 ` [PATCH 4/8] Disassemble blocks with non-contiguous ranges Kevin Buettner
2018-08-01  2:08   ` Simon Marchi
2018-06-26  6:51 ` [PATCH 5/8] Use BLOCK_ENTRY_PC in place of most uses of BLOCK_START Kevin Buettner
2018-08-01  2:22   ` Simon Marchi
2018-08-02  0:07     ` Kevin Buettner
2018-06-26  6:53 ` [PATCH 6/8] Use BLOCK_ENTRY_PC to find function entry pc in infrun.c Kevin Buettner
2018-08-01  2:28   ` Simon Marchi
2018-06-26  6:55 ` [PATCH 7/8] Relocate block range start and end addresses Kevin Buettner
2018-08-01  2:30   ` Simon Marchi
2018-06-26  6:57 ` [PATCH 8/8] Test case for functions with non-contiguous ranges Kevin Buettner
2018-08-01  2:56   ` Simon Marchi
2018-07-11 15:27 ` [PATCH 0/8] Non-contiguous address range support Kevin Buettner
2018-07-11 15:32   ` Keith Seitz
2018-07-12 19:12 ` Simon Marchi
2018-07-17  2:00   ` Kevin Buettner
2018-07-19 15:55     ` Simon Marchi
2018-07-19 19:07       ` Kevin Buettner

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=20180801164039.400a0350@pinnacle.lan \
    --to=kevinb@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@ericsson.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