Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: Simon Marchi <simon.marchi@polymtl.ca>
Cc: gdb-patches@sourceware.org, Simon Marchi <simon.marchi@ericsson.com>
Subject: Re: [PATCH 0/8] Non-contiguous address range support
Date: Thu, 19 Jul 2018 19:07:00 -0000	[thread overview]
Message-ID: <20180719120722.1ad62f10@pinnacle.lan> (raw)
In-Reply-To: <009e5f0b06acafca3b778f0900f5df56@polymtl.ca>

On Thu, 19 Jul 2018 11:55:48 -0400
Simon Marchi <simon.marchi@polymtl.ca> wrote:

> On 2018-07-16 22:00, Kevin Buettner wrote:
> > Hi Simon,
> > 
> > I haven't tried the simpler caching approach that you outline above.
> > It seems like it should work and it would definitely make checking for
> > whether or not something is in the cache simpler.
> > 
> > I'll give it a try and run the test suite to see if there's a problem 
> > with
> > doing it that way.
> > 
> > Thanks,
> > 
> > Kevin  
> 
> Just note that I don't have the complete picture yet.  If the block 
> range information is necessary for some other reason, then it would make 
> sense to use it as well for that cache.  I didn't want to send you on a 
> long side-quest for nothing!

Hi Simon,

The block range information is still required for several other reasons.
One obvious case is that we need to iterate through the ranges for
displaying disassembly.

However, I really liked your suggestion because we can retain the simple
test for determining whether or not PC is in the cache:

  if (mapped_pc >= cache_pc_function_low
      && mapped_pc < cache_pc_function_high
      && section == cache_pc_function_section)
    goto return_cached_value;

I've posted a replacement for patch 3/8 which uses your approach. 
Note that the block range information is still used within that patch
for determining the low and high addresses for the cache.

What's not in that patch is the removal of block_contains_pc which
was added in patch 1/8.  The only caller of this function was in
my earlier patch for find_pc_partial_function (in 3/8).  It's no
longer needed.

I'm guessing that you'll have some suggestions which will require
a v2 patch series.  I'll wait to show the removal of block_contains_pc
until that time.

Thanks for looking at this...

Kevin


      reply	other threads:[~2018-07-19 19:07 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-26  6:32 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
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 [this message]

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