From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id Gdt5B1uobF+jfQAAWB0awg (envelope-from ) for ; Thu, 24 Sep 2020 10:08:27 -0400 Received: by simark.ca (Postfix, from userid 112) id 106171EE05; Thu, 24 Sep 2020 10:08:27 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id DF5F31E509 for ; Thu, 24 Sep 2020 10:08:25 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5F0E93953C04; Thu, 24 Sep 2020 14:08:25 +0000 (GMT) Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 0F4083857C52 for ; Thu, 24 Sep 2020 14:08:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0F4083857C52 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark@simark.ca Received: from [10.0.0.11] (173-246-6-90.qc.cable.ebox.net [173.246.6.90]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 94B7B1E509; Thu, 24 Sep 2020 10:08:22 -0400 (EDT) Subject: Re: [PATCH] [gdb] Add Z80 CPU basic support To: sergey.belyashov@gmail.com, gdb-patches@sourceware.org References: <28250680-67b9-7551-72fb-bb5826eeecbd@simark.ca> <20200924082621.19370-1-sergey.belyashov@gmail.com> From: Simon Marchi Message-ID: <34795027-0954-e286-dc1a-1f810a8ff6e1@simark.ca> Date: Thu, 24 Sep 2020 10:08:22 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20200924082621.19370-1-sergey.belyashov@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: fr Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" Thanks, I was able to apply it successfully. It doesn't build, however, please make sure it builds against the current master. Some questions: - What's the history behind this code? Is is currently maintained somewhere else? Do you own it all? In order to push that code (and transfer the copyright to the FSF), everybody who currently owns it must have an assignment on file, normally. - How do you test this? How can I test this? Add this to the commit message. - Did you manage to run parts of the GDB testsuite against this? - If I want more information about the Z80 architecture, such as the ISA details, ABI, etc, where do I look? It would also be a good idea to add this to the commit message. - I see mention of "eZ80". Can you provide information about what CPUs are supported, what CPUs are not supported? Include any relevant detail like that in the commit message. We want to avoid people dropping code and then leaving a maintenance burden to others. Ideally, each architecture should have a maintainer (listed in the MAINTAINERS file) responsible for reviewing patches about that architecture, and to whom we can reach out for questions about that architecture. Would you be ready to accept such a role? Please include the ChangeLog entries in the commit message. Take this patch as an example: https://sourceware.org/pipermail/gdb-patches/2020-September/171620.html You can add the NEWS entry directly in the commit. > diff --git a/gdb/features/z80-cpu.xml b/gdb/features/z80-cpu.xml > new file mode 100644 > index 0000000000..d8093d68b9 > --- /dev/null > +++ b/gdb/features/z80-cpu.xml > @@ -0,0 +1,34 @@ > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + Shouldn't there be two different target descriptions for Z80 and eZ80? > diff --git a/gdb/regformats/z80.dat b/gdb/regformats/z80.dat > new file mode 100644 > index 0000000000..05580c8588 > --- /dev/null > +++ b/gdb/regformats/z80.dat I don't think you need a .dat file, today it's only used by some remaining GDBserver ports. > @@ -0,0 +1,18 @@ > +# THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro: > +# Generated from: z80.xml > +name:z80 > +xmltarget:z80.xml > +expedite:sp,pc > +16:af > +16:bc > +16:de > +16:hl > +16:sp > +32:pc > +16:ix > +16:iy > +16:af' > +16:bc' > +16:de' > +16:hl' > +16:ir > diff --git a/gdb/stubs/z80-stub.c b/gdb/stubs/z80-stub.c > new file mode 100644 > index 0000000000..36316b95ba > --- /dev/null > +++ b/gdb/stubs/z80-stub.c What is this file for? How do I use it? Simon