[PATCH 2/2] Use dwarf assembler in gdb.dwarf2/implptr-64bit.exp

Yao Qi qiyaoltc@gmail.com
Wed Jan 25 16:26:00 GMT 2017


> 
> > +		variable_label: variable {
> 
> ...this causes FAILs on one of my systems unless replacing the
> "variable" above by "DW_TAG_variable".  Note that "variable" is a Tcl
> command.
>

Fixed.
 
> > +		    { name v }
> > +		    { location {
> > +			DW_OP_implicit_value 0x1 0x1 0x1 0x1
> > +		    } SPECIAL_expr}
> > +		    { type :$struct_label "DW_FORM_ref$ref_addr_size" }
> > +		}
> > +
> > +		if { !$two_cu } {
> > +		    subprogram {
> > +			{ name main }
> > +			{ low_pc main addr }
> > +			{ high_pc "main+0x100" addr }
> > +			{ type %$int_label }
> > +			{ external 1 flag }
> > +		    } {
> > +			variable {
> 
> Same here.
> 
> > diff --git a/gdb/testsuite/lib/dwarf.exp b/gdb/testsuite/lib/dwarf.exp
> > index 1883c86..db51f5d 100644
> > --- a/gdb/testsuite/lib/dwarf.exp
> > +++ b/gdb/testsuite/lib/dwarf.exp
> 
> Looks OK to me as well, except a nit:
> 
> > +			switch -regexp -- $value {
> > +			    {^0x[[:xdigit:]]{1}$} {_op .byte $value}
> > +			    {^0x[[:xdigit:]]{2}$} {_op .byte $value}
> 
> I'd rather replace the above two lines by a single one, to emphasize
> that both cases are handled in the same way:
> 
> 			    {^0x[[:xdigit:]]{1,2}$} {_op .byte $value}
> 

Fixed.  I pushed these two patches in.

-- 
Yao (齐尧)



More information about the Gdb-patches mailing list