From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2918 invoked by alias); 16 Dec 2013 04:20:16 -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 2905 invoked by uid 89); 16 Dec 2013 04:20:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.8 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 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 ESMTP; Mon, 16 Dec 2013 04:20:15 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rBG4KDEY032454 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 15 Dec 2013 23:20:13 -0500 Received: from psique (ovpn-113-60.phx2.redhat.com [10.3.113.60]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id rBG4KAYn013369 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sun, 15 Dec 2013 23:20:12 -0500 From: Sergio Durigan Junior To: Doug Evans Cc: GDB Patches Subject: Re: [PATCH] Improve and fix catch-syscall.exp References: X-URL: http://www.redhat.com Date: Mon, 16 Dec 2013 04:20:00 -0000 In-Reply-To: (Doug Evans's message of "Sun, 15 Dec 2013 10:30:35 -0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2013-12/txt/msg00563.txt.bz2 On Sunday, December 15 2013, Doug Evans wrote: > Hi. > > I was wondering, what if the magic numbers that are the syscall > numbers were recorded in the test .c file like: > > int close_syscall_number = foo; > > and then have the .exp fetch these values after running-to-main. > That would save having to record syscall numbers in the .exp, > and all the conditionals to test for the architecture. But then we'd have to make the conditionals on the .c file instead, right? I mean, we'd just be switching the place of the problem... > Not sure there isn't a flaw in this plan, > and I guess it's debatable whether it's better to just record > the numbers in the .exp or reference the __NR_* numbers from asm/unistd*.h > in the .c, but it sounds promising. The .exp file needs to know the syscall numbers (not only the names) in order to compare them with the output of "catch syscall". Therefore, just referencing the syscalls as __NR_* won't help with that... Unless I'm missing something in your proposal, I don't see how it could improve the current situation. -- Sergio