From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 106523 invoked by alias); 1 Apr 2016 13:05:35 -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 106481 invoked by uid 89); 1 Apr 2016 13:05:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-pa0-f42.google.com Received: from mail-pa0-f42.google.com (HELO mail-pa0-f42.google.com) (209.85.220.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 01 Apr 2016 13:05:28 +0000 Received: by mail-pa0-f42.google.com with SMTP id td3so89754644pab.2 for ; Fri, 01 Apr 2016 06:05:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=0D+AIslNhUrQEQu276FVi9RDsNggQUG4y/jfkqsbZZ8=; b=EVPbPmgnB+Fqd6NcLrjSWqG/kDUKFFcADI1Hoouqv7TCDHn+r3ErShdsoTL24ppEs1 dtHNT1FZ2GfWYY9K/mFRziXOuEcqyapNzaUBFTivezSic/FS6sFmLVJgGkyr5LoAhjMY ACnS4gKKo7j8RP8dlt9fTW1vYBUGrXmYpLMaQHEG3WYLyLrA94uwJj06ChgbPbOolFsg TgIslPPxkRerCQBHYn4M27FLijLpQCS9Pp6NN7AZ6Oj/xlSF84RY4m3lCTQHtDf5CscN H006HPrBwlwqhfHqRHGep/WISxH6zx7WeLoiIR7AXY3vFZ0fwI3WzjZ/+eqW3i9eREFc XrjA== X-Gm-Message-State: AD7BkJKGeCQvb35Arin4a5+pZ2fty4O7AGAnE/bkEwcyNxJH+pGaVcGH0HvV+GTC/hTImQ== X-Received: by 10.66.148.232 with SMTP id tv8mr30503165pab.21.1459515926839; Fri, 01 Apr 2016 06:05:26 -0700 (PDT) Received: from E107787-LIN (power-aix.osuosl.org. [140.211.15.154]) by smtp.gmail.com with ESMTPSA id ey7sm20751230pab.47.2016.04.01.06.05.22 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 01 Apr 2016 06:05:25 -0700 (PDT) From: Yao Qi To: Josh Stone Cc: Yao Qi , Pedro Alves , gdb-patches@sourceware.org, philippe.waroquiers@skynet.be, sergiodj@redhat.com, eliz@gnu.org, xdje42@gmail.com, scox@redhat.com Subject: Re: [PATCH v4] Implement 'catch syscall' for gdbserver References: <1449196006-13759-2-git-send-email-jistone@redhat.com> <1452308954-13679-1-git-send-email-jistone@redhat.com> <5694EC0E.2080904@redhat.com> <56954F8C.6010100@redhat.com> <56955283.1060502@redhat.com> <56955B84.7050905@redhat.com> <86mvphs6kv.fsf@gmail.com> <56FAC588.6060200@redhat.com> <56FB1486.60208@redhat.com> <86io04rw7k.fsf@gmail.com> <56FC78E3.6020300@redhat.com> Date: Fri, 01 Apr 2016 13:05:00 -0000 In-Reply-To: <56FC78E3.6020300@redhat.com> (Josh Stone's message of "Wed, 30 Mar 2016 18:09:55 -0700") Message-ID: <86bn5tqy29.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2016-04/txt/msg00002.txt.bz2 Josh Stone writes: > Well, sure, but I have no idea where that somewhere else could be. > > Note these architectures do work for other syscall returns. It's just > that execve is a bit special by switching the whole process out. I talked with a kernel people, looks GDB can't fetch the syscall number on execve exit. > > I suppose we could try to save the number on syscall entry, and just > report that again when it returns. But it's not 100% sure that we'll Yes, that is what I am thinking too. > see every entry first. For instance, one could 'catch execve' first, > which will continue until PTRACE_EVENT_EXEC mid-syscall, then turn on > 'catch syscall' and see what returns. > (This is similar to what test_catch_syscall_mid_vfork checks.) Yeah, we can't guarantee syscall enter comes into first. I doubt 'lp->syscall_state' is confused in this case too, no? --=20 Yao (=E9=BD=90=E5=B0=A7)