[V2] dwarf.exp: Allow generating a stub .debug_line section
Commit Message
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
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.
@@ -1165,6 +1165,7 @@ namespace eval Dwarf {
_section $section
if { "$label" != "" } {
+ # Define the user-provided label at this point.
$label:
}