From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23846 invoked by alias); 14 Sep 2012 22:34:45 -0000 Received: (qmail 23693 invoked by uid 22791); 14 Sep 2012 22:34:43 -0000 X-SWARE-Spam-Status: No, hits=-4.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,KHOP_RCVD_TRUST,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,RP_MATCHES_RCVD,TW_EG X-Spam-Check-By: sourceware.org Received: from mail-gh0-f201.google.com (HELO mail-gh0-f201.google.com) (209.85.160.201) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 14 Sep 2012 22:34:24 +0000 Received: by ghbz19 with SMTP id z19so462658ghb.0 for ; Fri, 14 Sep 2012 15:34:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:message-id:to:subject:from:x-gm-message-state; bh=oURcMUW00bL97rmSBN62X0cRFEN99GNym38kutnlCj8=; b=p4qffmz69VjAJpg3ZNoYLTU1g5fKkpCdhq8kMrPgZnzCw5iGlAYOCoVp+WUmmqZ+7r fLFE6Ipcu24y129cjS7JdF59241lRQygCkz9DsA/c4LPhMB5uuS47TLGaCxI+kUquAsc UKpS3wXcfB2x7YkK18qmico++dMCaWL3VLdBudDf/XioVHzaKzQEXvvT1euGocYSY+Sm /1Dr9G6rIiZpLjDEpRN88eqOAa8rcvlmbjF8VEIaxocaYuFLBc7ejSDm61E4muB9xE3E ulplGrWREAq1c07gc3sWOM2JFxtSViWFocWvQpps7itZCa46LHMbmgF9dDWOrzlCjlWC oTiw== Received: by 10.236.75.138 with SMTP id z10mr2768052yhd.14.1347662064345; Fri, 14 Sep 2012 15:34:24 -0700 (PDT) Received: by 10.236.75.138 with SMTP id z10mr2768046yhd.14.1347662064292; Fri, 14 Sep 2012 15:34:24 -0700 (PDT) Received: from wpzn3.hot.corp.google.com (216-239-44-65.google.com [216.239.44.65]) by gmr-mx.google.com with ESMTPS id q2si598544yhi.5.2012.09.14.15.34.24 (version=TLSv1/SSLv3 cipher=AES128-SHA); Fri, 14 Sep 2012 15:34:24 -0700 (PDT) Received: from ruffy2.mtv.corp.google.com (ruffy2.mtv.corp.google.com [172.18.110.129]) by wpzn3.hot.corp.google.com (Postfix) with ESMTP id F1590100047 for ; Fri, 14 Sep 2012 15:34:23 -0700 (PDT) Date: Fri, 14 Sep 2012 22:34:00 -0000 Message-Id: To: gdb-patches@sourceware.org Subject: [patch] callfuncs.exp: set unwindonsignal on From: dje@google.com X-Gm-Message-State: ALoCoQmjFzJPbSZAcOcEKfh8nutnn1K0BvWEl2WZPtYj+203vaBtIbAz5wABqyLJQk740NDwaarH2wlB1f5mV2ZyC6V26R5E0+oipd3eqZFhPtHU/CeOkwOdx2W7KKS7KI9kMoRNlrsrtpcR7DWsI3mtvAQNJJmH6H9tpOKClF/aG87J6c/10puC/SOuJpTlrT/k3sznIVIkhChoEYSl74BYoYWjcBNl723eLlGhn65yP3hnM0n6/6s= X-IsSubscribed: yes 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 X-SW-Source: 2012-09/txt/msg00295.txt.bz2 Hi. Testing cvs head with i686 binaries and 64-bit gdb has this failure: FAIL: gdb.base/callfuncs.exp: gdb function calls preserve register contents [I'm guessing the same failure will be seen with 32-bit native.] The problem is that these tests segv (and are marked KFAIL), but the stack isn't unwound. setup_kfail_for_target gdb/12783 "i?86-*-*" setup_kfail_for_target gdb/12796 "x86_64-*-*" gdb_test "p t_structs_dc(struct_val1)" ".*= 4 \\+ 4 \\* I" \ "call inferior func with struct - returns double _Complex" setup_kfail_for_target gdb/12783 "i?86-*-*" setup_kfail_for_target gdb/12796 "x86_64-*-*" gdb_test "p t_structs_ldc(struct_val1)" "= 5 \\+ 5 \\* I" \ "call inferior func with struct - returns long double _Complex" I don't see a problem with setting unwindonsignal - failure to produce the expected result will still be caught. And if any test modifies the original register values, that'll still be caught too. I'll check this in in a few days if there are no objections. 2012-09-14 Doug Evans * gdb.base/callfuncs.exp (do_function_calls): Set unwindonsignal to on while running the tests. Index: callfuncs.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.base/callfuncs.exp,v retrieving revision 1.52 diff -u -p -r1.52 callfuncs.exp --- callfuncs.exp 9 Jul 2012 14:20:52 -0000 1.52 +++ callfuncs.exp 14 Sep 2012 22:29:09 -0000 @@ -65,6 +65,10 @@ proc do_function_calls {} { # We need to up this because this can be really slow on some boards. set timeout 60; + # If any of these calls segv we don't want to affect subsequent tests. + # E.g., we want to ensure register values are restored. + gdb_test_no_output "set unwindonsignal on" + gdb_test "p t_char_values(0,0)" " = 0" gdb_test "p t_char_values('a','b')" " = 1" gdb_test "p t_char_values(char_val1,char_val2)" " = 1" @@ -259,6 +263,9 @@ proc do_function_calls {} { gdb_test "p t_structs_a(struct_val1)" "= (.unsigned char .. )? \"foo\"" \ "call inferior func with struct - returns char *" + + # Restore default value. + gdb_test_no_output "set unwindonsignal off" } # Procedure to get current content of all registers.