From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 57878 invoked by alias); 6 Mar 2015 16:36:39 -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 57865 invoked by uid 89); 6 Mar 2015 16:36:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KAM_FROM_URIBL_PCCC,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-pd0-f177.google.com Received: from mail-pd0-f177.google.com (HELO mail-pd0-f177.google.com) (209.85.192.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 06 Mar 2015 16:36:38 +0000 Received: by pdev10 with SMTP id v10so29823459pde.0 for ; Fri, 06 Mar 2015 08:36:36 -0800 (PST) X-Received: by 10.66.97.68 with SMTP id dy4mr26928159pab.148.1425659796489; Fri, 06 Mar 2015 08:36:36 -0800 (PST) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by mx.google.com with ESMTPSA id ei3sm9872407pbc.91.2015.03.06.08.36.33 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 06 Mar 2015 08:36:35 -0800 (PST) From: Yao Qi To: Sergio Durigan Junior Cc: Pedro Alves , Yao Qi , gdb-patches@sourceware.org Subject: Re: [RFC] Support command "catch syscall" properly on different targets References: <1425047015-1906-1-git-send-email-qiyaoltc@gmail.com> <877fv3kqx1.fsf@redhat.com> <86lhjei8md.fsf@gmail.com> <54F5A90E.8050704@redhat.com> <87bnkaklbe.fsf@redhat.com> Date: Fri, 06 Mar 2015 16:36:00 -0000 In-Reply-To: <87bnkaklbe.fsf@redhat.com> (Sergio Durigan Junior's message of "Tue, 03 Mar 2015 13:06:13 -0500") Message-ID: <868ufahylt.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: 2015-03/txt/msg00173.txt.bz2 Sergio Durigan Junior writes: > Anyway, I just raised this point because we shouldn't "return 1" when > asked if inf-ttrace.c supports "catch syscall". Sergio, I'll remove inf_ttrace_supports_syscall_catchpoint from my updated patch. Thanks for pointing this out. In my patch, "catch syscall" command is allowed on the target which supports catch syscall. On exec target, GDB will error on command "catch syscall", so it causes regressions in catch-syscall.exp. The proc test_catch_syscall_multi_arch in catch-syscall.exp tests syscall number is mapped to different syscall number on different gdbarch, but it has: # We are not interested in loading any binary here, and in # some systems (PowerPC, for example), if we load a binary # there is no way to set other architecture. As you mentioned in https://sourceware.org/bugzilla/show_bug.cgi?id=3D10737#c4 , when GDB starts an inferior, the arch is set correspondingly, so it is unable reproduce the bug. test_catch_syscall_multi_arch is the simpler reproducer, IMO. How about 'upgrade' test_catch_syscall_multi_arch like this? - file 32-bit program - run to main - catch syscall 5 - kill - file 64-bit program - run to main - catch syscall 5 --=20 Yao (=E9=BD=90=E5=B0=A7)