From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 88178 invoked by alias); 24 Jun 2016 17:57:25 -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 88165 invoked by uid 89); 24 Jun 2016 17:57:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy= X-HELO: bigwig.baldwin.cx Received: from bigwig.baldwin.cx (HELO bigwig.baldwin.cx) (96.47.65.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Fri, 24 Jun 2016 17:57:22 +0000 Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 6BCB5B978; Fri, 24 Jun 2016 13:57:20 -0400 (EDT) From: John Baldwin To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Add support for catching system calls to native FreeBSD targets. Date: Fri, 24 Jun 2016 17:57:00 -0000 Message-ID: <1655704.BrXudgvZLr@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.3-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <896dc72b-43d4-2c7d-7fac-7e81431b0922@redhat.com> References: <20160614205751.11566-1-jhb@FreeBSD.org> <7374404.qtI4NAOGSQ@ralph.baldwin.cx> <896dc72b-43d4-2c7d-7fac-7e81431b0922@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-IsSubscribed: yes X-SW-Source: 2016-06/txt/msg00402.txt.bz2 On Friday, June 24, 2016 04:52:23 PM Pedro Alves wrote: > 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. Oh, no worry. I don't mind refactoring when it makes sense. I've gone ahead and pushed the current patch with nits addressed. -- John Baldwin