Re: [PATCH v2 2/2] Correct invalid assumptions made by (mostly) DWARF-2 tests

Joel Brobecker
2014-11-16T11:09:39Z

> 2014-10-06 Maciej W. Rozycki <macro@codesourcery.com>
>
> gdb/testsuite/
> * gdb.cp/expand-psymtabs-cxx.exp: Accept any address of
> `method(long)', not just 0x0.
> * gdb.cp/nsalias.exp: Align code labels to 4.
> * gdb.dwarf2/dw2-canonicalize-type.S (main): Expand to 4-bytes.
> * gdb.dwarf2/dw2-empty-pc-range.S (main): Likewise.
> * gdb.dwarf2/pr11465.S (_ZN1N1cE): Likewise.
> * gdb.dwarf2/dw2-case-insensitive.c (START_INSNS): New macro.
> (cu_text_start, FUNC_lang_start): Use `START_INSNS'.
> * gdb.dwarf2/dw2-stack-boundary.exp: Accept noise in complaints.

Overall, everything looks very reasonable.

Small nit: There is a space at the end of the first CL line (after
"address of").

One question (pre-approved if my suggestion works):

> Index: gdb-fsf-trunk-quilt/gdb/testsuite/gdb.dwarf2/dw2-canonicalize-type.S
> ===================================================================
> --- gdb-fsf-trunk-quilt.orig/gdb/testsuite/gdb.dwarf2/dw2-canonicalize-type.S 2014-10-02 07:56:23.000000000 +0100
> +++ gdb-fsf-trunk-quilt/gdb/testsuite/gdb.dwarf2/dw2-canonicalize-type.S 2014-10-02 07:58:10.978958268 +0100
> @@ -15,7 +15,8 @@
>
> .text
> .globl main
> -main: .byte 0
> +main:
> + .dc.l 0

We've never used .dl.l before, and I don't know how widely available
it is (in fact, I couldn't find it in the GAS manual). How about using
.word or .4byte? It would also be consistent with what we've usually be
using. Would that work?

> Index: gdb-fsf-trunk-quilt/gdb/testsuite/gdb.dwarf2/dw2-empty-pc-range.S
> ===================================================================
> --- gdb-fsf-trunk-quilt.orig/gdb/testsuite/gdb.dwarf2/dw2-empty-pc-range.S 2014-10-02 07:56:23.000000000 +0100
> +++ gdb-fsf-trunk-quilt/gdb/testsuite/gdb.dwarf2/dw2-empty-pc-range.S 2014-10-02 07:58:10.978958268 +0100
> @@ -15,7 +15,7 @@
>
> .text
> pc_start:
> - .byte 0
> + .dc.l 0
> pc_end:

Same here...

> Index: gdb-fsf-trunk-quilt/gdb/testsuite/gdb.dwarf2/pr11465.S
> ===================================================================
> --- gdb-fsf-trunk-quilt.orig/gdb/testsuite/gdb.dwarf2/pr11465.S 2014-10-02 07:56:23.000000000 +0100
> +++ gdb-fsf-trunk-quilt/gdb/testsuite/gdb.dwarf2/pr11465.S 2014-10-02 07:58:10.978958268 +0100
> @@ -39,7 +39,7 @@
> text_start:
> _ZN1N1cE:
> /* Valid function must have non-empty PC range. */
> - .byte 0
> + .dc.l 0

... and here.

--
Joel