From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6525 invoked by alias); 23 Feb 2011 07:21:43 -0000 Received: (qmail 6512 invoked by uid 22791); 23 Feb 2011 07:21:42 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 23 Feb 2011 07:21:34 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id AAA8E2BAB7B for ; Wed, 23 Feb 2011 02:21:32 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id GsiO3ZpiXgKc for ; Wed, 23 Feb 2011 02:21:32 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 434DD2BAB67 for ; Wed, 23 Feb 2011 02:21:32 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id E24FF1459B0; Wed, 23 Feb 2011 11:21:23 +0400 (RET) Date: Wed, 23 Feb 2011 08:46:00 -0000 From: Joel Brobecker To: gdb-patches@sourceware.org Subject: [RFC] move strace call to gdb_init? (away from testcase) Message-ID: <20110223072123.GQ2617@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) 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: 2011-02/txt/msg00638.txt.bz2 Hello, One of the things I constantly notice everytime I start writing a new testcase is that we always start it exactly the same way: if $tracelevel then { strace $tracelevel } I tried to research a bit how this works. As far as I can tell, the "tracelevel" variable is controlled via runtest's --strace command-line switch. Runtest already does the call to strace: "--str*" { # (--strace) expect trace level set tracelevel $optarg strace $tracelevel So, I don't think that setting it ourselves is going to be doing anything. As a test, I tried with various levels of strace-ing, and nothing seemed to change. In particular, the output in gdb.log remained the same with or without. (it might have done something if each testcase script was executed as it own expect process, but in fact, there is only one expect process, and testcases are just "source"-ed) So, I think we could just nuke the thing. Alternatively, we could be a little extra conservative, and reset it systematically at the start of every testcase, JIC a testcase changes the strace level. The best place to do that is in proc gdb_init (lib/gdb.exp). WDYT? -- Joel