From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) by sourceware.org (Postfix) with ESMTPS id E1EB1386184F for ; Thu, 15 Oct 2020 18:23:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E1EB1386184F Received: by mail-qt1-x834.google.com with SMTP id r8so28345qtp.13 for ; Thu, 15 Oct 2020 11:23:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=UayyWNg4VzIh5S/T9aMdPcOL2VCwthD9PO/YoEWU9zM=; b=Ipu02cWGaeyc+3hUuVF2FdKBDovStBFDf8UCHI0Me+C9WW45ZStgDD6+oOR8M5HbMx BDqQQk5gnc0Uj8w4EPd5ul7nbev3Suns9GzsSdXNBdE6CalBiC/2X7MfxQzbXncUivYa kKzeftJNIuDs3F+mNVY9sX+jnwgUT29Ko2qifnZ730jME6Tv/D7Z+0NMigt/sqr4BoGR eaN7PDEaEjicOjPzT5YdahMKnlzJAfxHIT72EJ8GkYNOHlJoyplisMc5HOVqZy+7Bzsk tLc0c4dM2OskwoJXvziNnum2QnPLx9cYkZXxoDxmDt6bkVz3Tsko+5G5Jty6CfQwrxC5 2qiA== X-Gm-Message-State: AOAM533fLadVdbXnT0wwE2NyN7wNEDGMIs8ii89GpQ/DBBAHqXXo0Fsk KGdzvpNVEGcUoVDvFRMsrjFU3QWrUXgw8w== X-Google-Smtp-Source: ABdhPJzHu5Dc3K1hkc6gGIgD9CauFj/XJN3UkaVRrYQcXUWEEhoAbIQttYVpgni32jV9cFe6zWaJ8Q== X-Received: by 2002:aed:243b:: with SMTP id r56mr5598168qtc.249.1602786217120; Thu, 15 Oct 2020 11:23:37 -0700 (PDT) Received: from ?IPv6:2804:7f0:8283:fe4b:a815:361f:f688:d8a1? ([2804:7f0:8283:fe4b:a815:361f:f688:d8a1]) by smtp.gmail.com with ESMTPSA id g188sm1420614qkf.3.2020.10.15.11.23.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 15 Oct 2020 11:23:36 -0700 (PDT) Subject: Re: porting gdbserver To: William Tambe , gdb@sourceware.org References: From: Luis Machado Message-ID: <2e91d8ee-00e0-1fe8-f2f3-9ee483319a70@linaro.org> Date: Thu, 15 Oct 2020 15:23:34 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham 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: Thu, 15 Oct 2020 18:23:57 -0000 Hi, On 10/15/20 1:34 PM, William Tambe via Gdb wrote: > Is there an easy to follow documentation or commit that shows how to port > gdbserver for baremetal ? > I'm afraid there isn't. I suppose you are talking about actually coming up with a debugging stub that implements the most minimal set of remote protocol packets, right? Not "gdbserver" itself, which is always OS-hosted. From the documentation here... https://sourceware.org/gdb/onlinedocs/gdb/Overview.html#Overview ... it says: "At a minimum, a stub is required to support the ‘?’ command to tell GDB the reason for halting, ‘g’ and ‘G’ commands for register access, and the ‘m’ and ‘M’ commands for memory access. Stubs that only control single-threaded targets can implement run control with the ‘c’ (continue) command, and if the target architecture supports hardware-assisted single-stepping, the ‘s’ (step) command. Stubs that support multi-threading targets should support the ‘vCont’ command. All other commands are optional." But the above may be stale at this point.