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 2/2] Use dwarf assembler in gdb.dwarf2/implptr-64bit.exp


On Tue, Jan 24 2017, Yao Qi wrote:

> diff --git a/gdb/testsuite/gdb.dwarf2/implptr-64bit.exp b/gdb/testsuite/gdb.dwarf2/implptr-64bit.exp
> index b4dcbde..9565579 100644
> --- a/gdb/testsuite/gdb.dwarf2/implptr-64bit.exp
> +++ b/gdb/testsuite/gdb.dwarf2/implptr-64bit.exp

Looks generally OK to me, except...

> +		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.

> +		    { 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}

--
Andreas


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