This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 6/6] Fix dw2-ifort-parameter.exp fail with clang
- From: Doug Evans <dje at google dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: <gdb-patches at sourceware dot org>
- Date: Tue, 4 Nov 2014 14:54:09 -0800
- Subject: Re: [PATCH 6/6] Fix dw2-ifort-parameter.exp fail with clang
- Authentication-results: sourceware.org; auth=none
- References: <1414195968-3333-1-git-send-email-yao at codesourcery dot com> <1414195968-3333-7-git-send-email-yao at codesourcery dot com>
Yao Qi writes:
> The patch <https://sourceware.org/ml/gdb-patches/2014-03/msg00202.html>
> fixed dw2-ifort-parameter.exp on powerpc64 by adding some labels to
> get the start and end address of function func. This should also fix the
> fail on thumb mode, however, this style is quite specific to gcc, and
> other compiler, such as clang, may not guarantee the order of global
> asms and functions. The test fails with clang:
>
> $ make check RUNTESTFLAGS='dw2-ifort-parameter.exp CC_FOR_TARGET=clang'
> (gdb) p/x param^M
> No symbol "param" in current context.^M
> (gdb) FAIL: gdb.dwarf2/dw2-ifort-parameter.exp: p/x param
>
> With this patch applied, dw2-ifort-parameter.exp still passes for gcc
> on arm thumb mode and popwerpc64, and it also passes for clang on
> x86_linux.
>
> gdb/testsuite:
>
> 2014-10-24 Yao Qi <yao@codesourcery.com>
>
> * gdb.dwarf2/dw2-ifort-parameter.c: Remove inline asm.
> (func): Add label func_label.
> * gdb.dwarf2/dw2-ifort-parameter.exp (Dwarf::assemble):
> Replace low_pc and high_pc with MACRO_AT_range.
> Replace name, low_pc and high_pc with MACRO_AT_func.
LGTM