public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Carl Love <cel@us.ibm.com>
To: gdb-patches@sourceware.org,
	will schmidt <will_schmidt@vnet.ibm.com>,
	Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
Subject: [Ping]  [PATCH] Fix gdb.base/step-indirect-call-thunk.exp
Date: Thu, 30 Jun 2022 08:12:49 -0700	[thread overview]
Message-ID: <d014d95b3a271368ccab5048fa66afde44f11c5c.camel@us.ibm.com> (raw)
In-Reply-To: <d97efd903c56adbeb63558a4a29c6aa2681476ef.camel@us.ibm.com>

Ping?


On Wed, 2022-06-15 at 09:21 -0700, Carl Love wrote:
> GDB maintainers:
> 
> The gdb regression test gdb.base/step-indirect-call-thunk.exp
> currently
> does not run on X86 due to a compile error related to incompatible
> gcc
> command line argument.  Secondly, the gcc command line arguments that
> are used are specific to Intel thus generating an unsupported command
> line error when compiled on other architectures.
> 
> This patch fixes the command line arguments so the test will compile
> on
> X86.  It also adds a check so the test will only run on X86.
> 
> Please let me know if this patch is acceptable for mainline.
> 
>                            Carl Love
> 
> 
> --------------------------------------------------------------
> Fix gdb.base/step-indirect-call-thunk.exp
> 
> This test fails on Intel X86-64 with the error:
> 
> Executing on host: gcc  -fno-stack-protector  -fdiagnostics-
> color=never
> -mindirect-branch=thunk -mfunction-return=thunk -c -g
> -o /.../gdb/testsuite/outputs/gdb.base/step-indirect-call-thunk/step-
> indirect-call-thunk0.o
> /.../gdb/testsuite/gdb.base/step-indirect-call-thunk.c
> (timeout = 300) builtin_spawn -ignore SIGHUP gcc -fno-stack-protector
> -fdiagnostics-color=never -mindirect-branch=thunk -mfunction-
> return=thunk -c
> -g -o /.../gdb/testsuite/outputs/gdb.base/step-indirect-call-
> thunk/step-indirect-call-thunk0.o
> /.../binutils-gdb-current/gdb/testsuite/gdb.base/step-indirect-call-
> thunk.c
> /.../gdb/testsuite/gdb.base/step-indirect-call-thunk.c:
>  In function 'inc': /.../gdb/testsuite/gdb.base/step-indirect-call-
> thunk.c:
> 22:1: error: '-mindirect-branch' and '-fcf-protection' are not
> compatible
>    22 | {                /* inc.1 */
> 
> As stated in the error message the default "-fcf-protection" and
> "-mindirect-branch' are in compatible.  The fcf-protection argument
> needs to be
> "-fcf-protection=none" for the test to compile on Intel.
> 
> The test also fails on PowerPC as the "-mindirect-branch' is an Intel
> specific
> GCC command line argument.  A check for X86 is added so the test will
> only run
> on X86 platforms.
> 
> The patch has been tested and verified on Power 10 and Intel X86-64
> systems with
> no regressions.
> ---
>  gdb/testsuite/gdb.base/step-indirect-call-thunk.exp | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/gdb/testsuite/gdb.base/step-indirect-call-thunk.exp
> b/gdb/testsuite/gdb.base/step-indirect-call-thunk.exp
> index 761e1d9a280..7c1b53c99be 100644
> --- a/gdb/testsuite/gdb.base/step-indirect-call-thunk.exp
> +++ b/gdb/testsuite/gdb.base/step-indirect-call-thunk.exp
> @@ -15,7 +15,11 @@
> 
>  standard_testfile
> 
> -set cflags "-mindirect-branch=thunk -mfunction-return=thunk"
> +if { ![istarget "x86*"] } {
> +    return
> +}
> +
> +set cflags "-mindirect-branch=thunk -mfunction-return=thunk -fcf-
> protection=none"
>  if { [prepare_for_testing "failed to prepare" $testfile $srcfile \
>          [list debug "additional_flags=$cflags"]] } {
>      return -1


  reply	other threads:[~2022-06-30 15:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-15 16:21 Carl Love
2022-06-30 15:12 ` Carl Love [this message]
2022-07-01 12:37 ` Bruno Larsen
2022-07-06 15:57   ` Carl Love
2022-07-06 15:59   ` [PATCH version 2] " Carl Love
2022-07-12 10:43     ` Ulrich Weigand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d014d95b3a271368ccab5048fa66afde44f11c5c.camel@us.ibm.com \
    --to=cel@us.ibm.com \
    --cc=Ulrich.Weigand@de.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=will_schmidt@vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).