From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 99647 invoked by alias); 24 Jun 2016 15:52:28 -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 99629 invoked by uid 89); 24 Jun 2016 15:52:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 24 Jun 2016 15:52:26 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E602D7F6B1; Fri, 24 Jun 2016 15:52:24 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u5OFqNMq029423; Fri, 24 Jun 2016 11:52:24 -0400 Subject: Re: [PATCH] Add support for catching system calls to native FreeBSD targets. To: John Baldwin References: <20160614205751.11566-1-jhb@FreeBSD.org> <53d24aec-5588-ea4f-7d6d-085aca553457@redhat.com> <7374404.qtI4NAOGSQ@ralph.baldwin.cx> Cc: gdb-patches@sourceware.org From: Pedro Alves Message-ID: <896dc72b-43d4-2c7d-7fac-7e81431b0922@redhat.com> Date: Fri, 24 Jun 2016 15:52:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <7374404.qtI4NAOGSQ@ralph.baldwin.cx> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2016-06/txt/msg00400.txt.bz2 On 06/24/2016 01:24 AM, John Baldwin wrote: > So I'm not quite sure how to implement an arch-specific target_op. > There are various linux_nat_set_* functions that accept a function pointer > but then just set a global variable. The amd64 version might have to copy > with different ABIs rather than depending on teh i386 gdbarch method, etc. See amd64-linux-nat.c:amd64_linux_siginfo_fixup for example. > > One option that is a bit smaller in scale would be to move the error > in break-catch-syscall.c into linux_child_set_syscall_catchpoint in > linux-nat.c. It could return 1 to fail the request if the gdbarch > method wasn't present. That might work indeed. In any case, I think what you have is reasonable, given the current framework. Please do feel free to push what you already have with the nits addressed. I did not mean for you to go eliminate the gdbarch hook as prerequisite; was really mainly thinking out loud. Sorry if it sounded otherwise. Thanks, Pedro Alves