From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gateway24.websitewelcome.com (gateway24.websitewelcome.com [192.185.50.252]) by sourceware.org (Postfix) with ESMTPS id 77AD03857004 for ; Fri, 28 Aug 2020 16:55:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 77AD03857004 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=tom@tromey.com Received: from cm13.websitewelcome.com (cm13.websitewelcome.com [100.42.49.6]) by gateway24.websitewelcome.com (Postfix) with ESMTP id 1997A5AB2 for ; Fri, 28 Aug 2020 11:55:15 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id Bhelk9IkmXp2ABhelkNERr; Fri, 28 Aug 2020 11:55:15 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=uOHk3eSWT805xjxpzd9Of4jKnGPwCgHWyd8os7NLZUs=; b=MgG8cko0KxXFRECwx6jMvxdBtn 9/wMM4uTm+c7lVPTNEAqmsM9+fHMjSuRa/0ne4ZZmBIHmuwQWu+5mdGLjxb1mHXscxBK0zbofrD8P f047hgjS/wDF7wz4SgUQYZbNO; Received: from 71-218-12-75.hlrn.qwest.net ([71.218.12.75]:38680 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1kBhek-002nLG-RF; Fri, 28 Aug 2020 10:55:14 -0600 From: Tom Tromey To: Pedro Alves Cc: "gdb@sourceware.org" Subject: Re: A note about a GDB BoF topic - libgdbserver References: <61f8f765-8984-b6ce-8732-5f3e637492d7@palves.net> X-Attribution: Tom Date: Fri, 28 Aug 2020 10:55:13 -0600 In-Reply-To: <61f8f765-8984-b6ce-8732-5f3e637492d7@palves.net> (Pedro Alves's message of "Fri, 28 Aug 2020 00:48:27 +0100") Message-ID: <87mu2e90cu.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 71.218.12.75 X-Source-L: No X-Exim-ID: 1kBhek-002nLG-RF X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 71-218-12-75.hlrn.qwest.net (bapiya) [71.218.12.75]:38680 X-Source-Auth: tom+tromey.com X-Email-Count: 16 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Spam-Status: No, score=-3026.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, JMQ_SPF_NEUTRAL, RCVD_IN_ABUSEAT, RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NEUTRAL, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Aug 2020 16:55:17 -0000 Pedro> Of course, another option would be to make gdbserver itself Pedro> link with libsim.a -- make the sim another gdbserver backend. Pedro> But that doesn't sound as cool. ;-) I looked into this a bit, since I was curious what it would take to make gdb require target async. My thought was to have a sort of "libgdbserver" -- basically consisting of all the non-"target low" files in gdbserver. Then, write a new low target somewhere in sim/. This seemed doable enough, but a bit of a pain as well. Testing the sims seems hard, at least for someone like me who isn't up on the details of the linker scripts to use etc. Another issue is that gdb lets the sims define a non-standard register layout. Maybe this could be reverse-engineered into an XML file that would be served by the sim. Or, maybe the sims could be changed to use gdb's built-in register layout. Anyway, the main problem is that it looks like a reasonably large amount of work, but where the impact is low. This seems especially true since IIUC, gdb requires even async-capable targets to still support leaving async mode at times. Tom