[V2] dwarf.exp: Allow generating a stub .debug_line section

Message ID 87pp7qjmh8.fsf@redhat.com
State New, archived
Headers

Commit Message

Petr Machata March 30, 2015, 7:48 p.m. UTC
  Doug Evans <dje@google.com> writes:

>  > +	if { "$label" != "" } {
>  > +	    $label:
>  > +	}
>
> Should this be:
>
> 	if { "$label" != "" } {
> 	    _emit "$label:"
> 	}

No, it's calling the function named "$label:".  To define the label that
the user supplied.  Would this make it clearer?


Thanks,
Petr
  

Comments

Doug Evans March 30, 2015, 8 p.m. UTC | #1
On Mon, Mar 30, 2015 at 12:48 PM, Petr Machata <pmachata@redhat.com> wrote:
> Doug Evans <dje@google.com> writes:
>
>>  > +  if { "$label" != "" } {
>>  > +      $label:
>>  > +  }
>>
>> Should this be:
>>
>>       if { "$label" != "" } {
>>           _emit "$label:"
>>       }
>
> No, it's calling the function named "$label:".  To define the label that
> the user supplied.  Would this make it clearer?
>
> --- a/gdb/testsuite/lib/dwarf.exp
> +++ b/gdb/testsuite/lib/dwarf.exp
> @@ -1165,6 +1165,7 @@ namespace eval Dwarf {
>         _section $section
>
>         if { "$label" != "" } {
> +           # Define the user-provided label at this point.
>             $label:
>         }
>
>
> Thanks,
> Petr

That helps enough.
Thanks.
  

Patch

--- a/gdb/testsuite/lib/dwarf.exp
+++ b/gdb/testsuite/lib/dwarf.exp
@@ -1165,6 +1165,7 @@  namespace eval Dwarf {
 	_section $section
 
 	if { "$label" != "" } {
+	    # Define the user-provided label at this point.
 	    $label:
 	}