From: Simon Marchi <simon.marchi@ericsson.com>
To: Kevin Buettner <kevinb@redhat.com>, <gdb-patches@sourceware.org>
Subject: Re: [PATCH 6/8] Use BLOCK_ENTRY_PC to find function entry pc in infrun.c
Date: Wed, 01 Aug 2018 02:28:00 -0000 [thread overview]
Message-ID: <187e47b4-64b5-33b3-8fb0-207a0aa24768@ericsson.com> (raw)
In-Reply-To: <20180625235326.2aa421f2@pinnacle.lan>
On 2018-06-26 02:53 AM, Kevin Buettner wrote:
> find_pc_partial_function() still returns the lowest and highest address
> of a function even when that function contains non-contiguous ranges.
> In cases where greater discrimination is required, the BLOCK parameter
> may be examined to determine the actual entry PC.
>
> This patch uses the BLOCK return value from find_pc_partial_function()
> to obtain the entry PC. If no block is found - which can happen when
> only minimal symbols are available - then the start address provided
> by find_pc_partial_function() will still be used (as before).
This one looks good to me, given how the stop_func_start field seems to
be used. From what I understand, it is used as the entry point of the
function, therefore BLOCK_ENTRY_PC seems appropriate.
> @@ -4297,10 +4297,20 @@ fill_in_stop_func (struct gdbarch *gdbarch,
> {
> if (!ecs->stop_func_filled_in)
> {
> + const struct block *block;
> +
> /* Don't care about return value; stop_func_start and stop_func_name
> will both be 0 if it doesn't work. */
> find_pc_partial_function (stop_pc, &ecs->stop_func_name,
> - &ecs->stop_func_start, &ecs->stop_func_end);
> + &ecs->stop_func_start, &ecs->stop_func_end,
> + &block);
> +
> + /* If a block is returned, prefer the block's entry point instead of
> + the lowest address of the block - these aren't necessarily the
> + same. */
> + if (block)
block != nullptr
Simon
next prev parent reply other threads:[~2018-08-01 2:28 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
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 [this message]
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=187e47b4-64b5-33b3-8fb0-207a0aa24768@ericsson.com \
--to=simon.marchi@ericsson.com \
--cc=gdb-patches@sourceware.org \
--cc=kevinb@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).