This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 5/8] Use BLOCK_ENTRY_PC in place of most uses of BLOCK_START


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

> On 2018-06-26 02:51 AM, Kevin Buettner wrote:
> > This change/patch substitues BLOCK_ENTRY_PC for BLOCK_START in
> > places where BLOCK_START is used to obtain the address at which
> > execution should enter the block.  Since blocks can now contain
> > non-contiguous ranges, the BLOCK_START - which is still be the
> > very lowest address in the block - might not be the same as
> > BLOCK_ENTRY_PC.
> > 
> > There is a change to infrun.c which is less obvious and less mechanical.
> > I'm posting it as a separate patch.  
> 
> Hi Kevin,
> 
> I haven't "gotten" yet when we want to use BLOCK_START and when we want
> to use BLOCK_ENTRY_PC.  I understand the difference between them, but
> don't quite understand how to know which is the one we want.  It might
> become clearer as I keep reading.  I trust you know what you are doing
> anyway, so I assume the patch is good :).

Once these patches go in, use of BLOCK_START will almost always be
wrong.

Exceptions are instances where you're doing some manipulations of the
block or cases where you (for some reason) need to know the lowest
address in the block.

Kevin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]