From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9095 invoked by alias); 25 Sep 2013 16:55:59 -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 9045 invoked by uid 89); 25 Sep 2013 16:55:58 -0000 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; Wed, 25 Sep 2013 16:55:58 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.4 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com 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 r8PGtlMo022186 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 25 Sep 2013 12:55:47 -0400 Received: from psique (ovpn-113-38.phx2.redhat.com [10.3.113.38]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r8PGthGs008430 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 25 Sep 2013 12:55:46 -0400 From: Sergio Durigan Junior To: "Agovic\, Sanimir" Cc: "'Philippe Waroquiers'" , "gdb-patches\@sourceware.org" Subject: Re: RFA [PATCH v3] Implement 'catch syscall' for gdbserver References: <1379796907.5980.20.camel@soleil> <0377C58828D86C4588AEEC42FC3B85A717680EC1@IRSMSX105.ger.corp.intel.com> <1379964754.2226.6.camel@soleil> <0377C58828D86C4588AEEC42FC3B85A7176814E1@IRSMSX105.ger.corp.intel.com> X-URL: http://www.redhat.com Date: Wed, 25 Sep 2013 16:55:00 -0000 In-Reply-To: <0377C58828D86C4588AEEC42FC3B85A7176814E1@IRSMSX105.ger.corp.intel.com> (Sanimir Agovic's message of "Tue, 24 Sep 2013 07:07:20 +0000") 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-09/txt/msg00900.txt.bz2 On Tuesday, September 24 2013, Sanimir Agovic wrote: >> > Is it sufficient to assign sysno/sysret to 0 to indicate missing 'catch syscall' >> > functionality? Both values seem legal to me. >> The idea is that will be used in case the user forces the use of the >> QCatchSyscalls packet. So, I think it is better to return "valid" (but >> not used) values : I do not think there is a syscall nr 0. >> > gdb -batch -ex 'set architecture i386:x86-64' -ex 'catch syscall 0' > The target architecture is assumed to be i386:x86-64 > Catchpoint 1 (syscall 'read' [0]) > > I just wanted to make sure that we do not report any false syscalls. > Thus I checked syscall 0 in gdb on amd64 which is mapped to 'read'. Thanks for catching that. I guess I had to solve the same problem for the native "catch syscall". If you look at the UNKNOWN_SYSCALL define (it's on gdbarch.h), you'll see that I have chosen the value of -1. I guess you could use the same trick, Philippe. WDYT? -- Sergio