Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@ericsson.com>
To: Kevin Buettner <kevinb@redhat.com>, <gdb-patches@sourceware.org>
Subject: Re: [PATCH v3 8/8] Test case for functions with non-contiguous ranges
Date: Tue, 21 Aug 2018 16:28:00 -0000	[thread overview]
Message-ID: <f80a82f3-3c34-b281-44ce-8c68e61925a1@ericsson.com> (raw)
In-Reply-To: <20180820154824.7f974d4e@pinnacle.lan>

Still LGTM, just some nits and one thing that looks a bit fishy.

> +	program {
> +	    {DW_LNE_set_address $main_start}
> +	    {DW_LNS_advance_line [expr [gdb_get_line_number "main prologue"] - 1]}
> +	    {DW_LNS_copy}
> +	    {DW_LNE_set_address main_label}
> +	    {DW_LNS_advance_line [expr [gdb_get_line_number "main foo call"] - [gdb_get_line_number "main prologue"]]}
> +	    {DW_LNS_copy}
> +	    {DW_LNE_set_address main_label2}
> +	    {DW_LNS_advance_line [expr [gdb_get_line_number "main return"] - [gdb_get_line_number "main foo call"]]}
> +	    {DW_LNS_copy}
> +	    {DW_LNE_set_address $main_start+$main_len}

Define and use main_end?

> +	    {DW_LNS_advance_line [expr [gdb_get_line_number "main end"] - [gdb_get_line_number "main return"] + 1]}
> +	    {DW_LNS_copy}
> +	    {DW_LNE_end_sequence}
> +
> +	    {DW_LNE_set_address $foo_start}
> +	    {DW_LNS_advance_line [expr [gdb_get_line_number "foo prologue"] - 1] }
> +	    {DW_LNS_copy}
> +	    {DW_LNE_set_address foo_label}
> +	    {DW_LNS_advance_line [expr [gdb_get_line_number "foo bar call"] - [gdb_get_line_number "foo prologue"]]}
> +	    {DW_LNS_copy}
> +	    {DW_LNE_set_address foo_label2}
> +	    {DW_LNS_advance_line [expr [gdb_get_line_number "foo foo_low call"] - [gdb_get_line_number "foo bar call"]]}
> +	    {DW_LNS_copy}
> +	    {DW_LNE_set_address foo_label3}
> +	    {DW_LNS_advance_line [expr [gdb_get_line_number "foo end"] - [gdb_get_line_number "foo foo_low call"]]}
> +	    {DW_LNS_copy}
> +	    {DW_LNE_set_address $foo_start+$foo_len}

foo_end?

> +	    {DW_LNS_advance_line 1}
> +	    {DW_LNS_copy}
> +	    {DW_LNE_end_sequence}
> +
> +	    {DW_LNE_set_address $bar_start}
> +	    {DW_LNS_advance_line [expr [gdb_get_line_number "bar end"] - 1]}
> +	    {DW_LNS_copy}
> +	    {DW_LNS_advance_pc $bar_len}
> +	    {DW_LNS_advance_line 1}
> +	    {DW_LNS_copy}
> +	    {DW_LNE_end_sequence}
> +
> +	    {DW_LNE_set_address $baz_start}
> +	    {DW_LNS_advance_line [expr [gdb_get_line_number "baz end"] - 1]}
> +	    {DW_LNS_copy}
> +	    {DW_LNS_advance_pc $baz_len}
> +	    {DW_LNS_advance_line 1}
> +	    {DW_LNS_copy}
> +	    {DW_LNE_end_sequence}
> +
> +	    {DW_LNE_set_address $foo_low_start}
> +	    {DW_LNS_advance_line [expr [gdb_get_line_number "foo_low prologue"] - 1]}
> +	    {DW_LNS_copy}
> +	    {DW_LNE_set_address foo_low_label}
> +	    {DW_LNS_advance_line [expr [gdb_get_line_number "foo_low baz call"] - [gdb_get_line_number "foo_low prologue"]]}
> +	    {DW_LNS_copy}
> +	    {DW_LNE_set_address foo_low_label2}
> +	    {DW_LNS_advance_line [expr [gdb_get_line_number "foo_low end"] - [gdb_get_line_number "foo_low baz call"]]}
> +	    {DW_LNS_copy}
> +	    {DW_LNE_set_address $foo_low_start$foo_low_len}

Is this concatenation intended?

> +	    {DW_LNS_advance_line 1}
> +	    {DW_LNS_copy}
> +	    {DW_LNE_end_sequence}
> +	}
> +    }
> +
> +    # Generate ranges data.
> +    ranges {is_64 [is_64_target]} {
> +	func_ranges_label: sequence {
> +	    {range {$foo_start } $foo_end}
> +	    {range {$foo_low_start} $foo_low_end}
> +	}
> +	cu_ranges_label: sequence {
> +	    {range {$foo_start } $foo_end}
> +	    {range {$foo_low_start} $foo_low_end}
> +	    {range {$main_start} $main_start + $main_len}
> +	    {range {$bar_start} $bar_start + $bar_len}
> +	    {range {$baz_start} $baz_start + $baz_len}

Use the _end variants?

Simon


  reply	other threads:[~2018-08-21 16:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-20 22:25 [PATCH v3 0/8] Non-contiguous address range support Kevin Buettner
2018-08-20 22:34 ` [PATCH v3 1/8] Add block range data structure for blocks with non-contiguous address ranges Kevin Buettner
2018-08-20 22:37 ` [PATCH v3 2/8] Record explicit block ranges from dwarf2read.c Kevin Buettner
2018-08-20 22:39 ` [PATCH v3 3/8] Add support for non-contiguous blocks to find_pc_partial_function Kevin Buettner
2018-08-21 16:12   ` Simon Marchi
2018-08-20 22:41 ` [PATCH v3 4/8] Disassemble blocks with non-contiguous ranges Kevin Buettner
2018-08-20 22:43 ` [PATCH v3 5/8] Use BLOCK_ENTRY_PC in place of most uses of BLOCK_START Kevin Buettner
2018-08-20 22:46 ` [PATCH v3 6/8] Introduce find_pc_partial_entry_range and use it in infrun.c Kevin Buettner
2018-08-21 16:19   ` Simon Marchi
2018-08-21 17:50     ` Kevin Buettner
2018-08-21 18:23       ` Simon Marchi
2018-08-21 18:47         ` Kevin Buettner
2018-08-20 22:47 ` [PATCH v3 7/8] Relocate block range start and end addresses Kevin Buettner
2018-08-20 22:48 ` [PATCH v3 8/8] Test case for functions with non-contiguous ranges Kevin Buettner
2018-08-21 16:28   ` Simon Marchi [this message]
2018-08-21 16:29 ` [PATCH v3 0/8] Non-contiguous address range support Simon Marchi

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=f80a82f3-3c34-b281-44ce-8c68e61925a1@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