From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 71688 invoked by alias); 11 Jan 2016 21:29:54 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 71674 invoked by uid 89); 11 Jan 2016 21:29:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=UD:funcargs.exp, funcargsexp, funcargs.exp X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 11 Jan 2016 21:29:53 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id AED14C0AA544; Mon, 11 Jan 2016 21:29:51 +0000 (UTC) Received: from host1.jankratochvil.net (ovpn-116-31.ams2.redhat.com [10.36.116.31]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u0BLTlMq018120 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 11 Jan 2016 16:29:50 -0500 Date: Mon, 11 Jan 2016 21:29:00 -0000 From: Jan Kratochvil To: Pedro Alves Cc: Simon Marchi , Simon Marchi , gdb-patches@sourceware.org Subject: [commit] [testsuite patch] i386 regression for funcargs.exp [Re: [PATCH 3/3] Remove HP-UX references fom testsuite] Message-ID: <20160111212947.GC7327@host1.jankratochvil.net> References: <1450567845-27030-1-git-send-email-simon.marchi@polymtl.ca> <1450567845-27030-3-git-send-email-simon.marchi@polymtl.ca> <5677F519.2010000@redhat.com> <567831CD.2090406@redhat.com> <20160108193033.GA2812@host1.jankratochvil.net> <569026E5.4060502@ericsson.com> <5693B046.60909@redhat.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="U+BazGySraz5kW0T" Content-Disposition: inline In-Reply-To: <5693B046.60909@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-IsSubscribed: yes X-SW-Source: 2016-01/txt/msg00196.txt.bz2 --U+BazGySraz5kW0T Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 105 On Mon, 11 Jan 2016 14:38:14 +0100, Pedro Alves wrote: > OK with that change. Checked in. Thanks, Jan --U+BazGySraz5kW0T Content-Type: message/rfc822 Content-Disposition: inline Content-length: 5091 From: Jan Kratochvil Date: Mon, 11 Jan 2016 22:27:15 +0100 Subject: [PATCH] testsuite: i386 regression for funcargs.exp Content-length: 4942 3ca22649a6dfeb71058c33be4d0542b98f1f0ff5 is the first bad commit commit 3ca22649a6dfeb71058c33be4d0542b98f1f0ff5 Author: Simon Marchi Date: Mon Dec 21 12:51:54 2015 -0500 Remove HP-UX references fom testsuite @@ -1013,13 +1013,6 @@ proc localvars_in_indirect_call { } { # gdb_test_multiple "finish" "finish from indirectly called function" { - -re "\\(\\*pointer_to_call0a\\) \\(c, s, i, l\\);.*First.*$gdb_prompt $" { - #On hppa2.0w-hp-hpux11.00, gdb finishes at one line earlier than - #hppa1.1-hp-hpux11.00. Therefore, an extra "step" is necessary - #to continue the test. - send_gdb "step\n" - exp_continue - } -re ".*\\(\\*pointer_to_call0a\\) \\(c, s, i, l\\);.*Second.*$gdb_prompt $" { pass "finish from indirectly called function" } -> finish^M Run till exit from #0 call0a (c=97 'a', s=1, i=2, l=3) at ./gdb.base/funcargs.c:82^M 0x0804a189 in main () at ./gdb.base/funcargs.c:583^M 583 (*pointer_to_call0a) (c, s, i, l); /* First step into call0a. */^M -(gdb) step^M -584 (*pointer_to_call0a) (c, s, i, l); /* Second step into call0a. */^M -(gdb) PASS: gdb.base/funcargs.exp: finish from indirectly called function +(gdb) FAIL: gdb.base/funcargs.exp: finish from indirectly called function step^M -call0a (c=97 'a', s=1, i=2, l=3) at ./gdb.base/funcargs.c:82^M -82 c = 'a';^M -(gdb) PASS: gdb.base/funcargs.exp: stepping into indirectly called function +584 (*pointer_to_call0a) (c, s, i, l); /* Second step into call0a. */^M +(gdb) FAIL: gdb.base/funcargs.exp: stepping into indirectly called function At least on x86_64 with testsuite in -m32 (expecting native i386 would be the same). Pedro Alves: The difference is that with newer GCC there's an extra instruction after the call which is still assigned to line 583: $ diff -up /tmp/4.8.3 /tmp/6.0.0 -U 1000 --- /tmp/4.8.3 2016-01-11 12:37:39.611089156 +0000 +++ /tmp/6.0.0 2016-01-11 13:21:00.021127976 +0000 @@ -1,27 +1,30 @@ 583 (*pointer_to_call0a) (c, s, i, l); /* First step into call0a. */ mov 0x804d060,%ebx mov 0x804d050,%ecx movzwl 0x804d040,%eax movswl %ax,%edx movzbl 0x804d030,%eax movsbl %al,%eax - mov %ebx,0xc(%esp) - mov %ecx,0x8(%esp) - mov %edx,0x4(%esp) - mov %eax,(%esp) - mov 0x7c(%esp),%eax + push %ebx + push %ecx + push %edx + push %eax + mov -0x1c(%ebp),%eax call *%eax + add $0x10,%esp 584 (*pointer_to_call0a) (c, s, i, l); /* Second step into call0a. */ mov 0x804d060,%ebx mov 0x804d050,%ecx movzwl 0x804d040,%eax movswl %ax,%edx movzbl 0x804d030,%eax movsbl %al,%eax - mov %ebx,0xc(%esp) - mov %ecx,0x8(%esp) - mov %edx,0x4(%esp) - mov %eax,(%esp) - mov 0x7c(%esp),%eax + push %ebx + push %ecx + push %edx + push %eax + mov -0x1c(%ebp),%eax call *%eax + add $0x10,%esp + I don't know why -m32 changed to push/add instead of mov while 64-bit hasn't. This is most likely needed on non-x86 ports as well. gdb/testsuite/ChangeLog 2016-01-11 Jan Kratochvil Pedro Alves * gdb.base/funcargs.exp (finish from indirectly called function): Reintroduce the case for 'First'. --- gdb/testsuite/ChangeLog | 6 ++++++ gdb/testsuite/gdb.base/funcargs.exp | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 8b0425b..c5cee45 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,6 +1,12 @@ 2016-01-11 Jan Kratochvil Pedro Alves + * gdb.base/funcargs.exp (finish from indirectly called function): + Reintroduce the case for 'First'. + +2016-01-11 Jan Kratochvil + Pedro Alves + * gdb.base/foll-vfork.exp (tcatch_vfork_then_parent_follow) (tcatch_vfork_then_child_follow_exec) (tcatch_vfork_then_child_follow_exit): Revert back DWARF vfork diff --git a/gdb/testsuite/gdb.base/funcargs.exp b/gdb/testsuite/gdb.base/funcargs.exp index e5b6ced..792ca9e 100644 --- a/gdb/testsuite/gdb.base/funcargs.exp +++ b/gdb/testsuite/gdb.base/funcargs.exp @@ -1013,6 +1013,13 @@ proc localvars_in_indirect_call { } { # gdb_test_multiple "finish" "finish from indirectly called function" { + -re "\\(\\*pointer_to_call0a\\) \\(c, s, i, l\\);.*First.*$gdb_prompt $" { + # If the branch instruction is not the last instruction in the + # function call line, we'll stop at that line, and need an extra + # "step" to continue the test. + send_gdb "step\n" + exp_continue + } -re ".*\\(\\*pointer_to_call0a\\) \\(c, s, i, l\\);.*Second.*$gdb_prompt $" { pass "finish from indirectly called function" } -- 2.5.0 --U+BazGySraz5kW0T--