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 v3 8/8] Test case for functions with non-contiguous ranges


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


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