From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id EE4AF3858D28 for ; Mon, 18 Apr 2022 13:46:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EE4AF3858D28 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 23IDk4Vq026555 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 18 Apr 2022 09:46:09 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 23IDk4Vq026555 Received: from [10.0.0.11] (192-222-157-6.qc.cable.ebox.net [192.222.157.6]) (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 827AF1E150; Mon, 18 Apr 2022 09:46:04 -0400 (EDT) Message-ID: Date: Mon, 18 Apr 2022 09:46:03 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: native gdb Content-Language: en-US To: Mahesh Bodapati , gdb@sourceware.org References: From: Simon Marchi In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Mon, 18 Apr 2022 13:46:04 +0000 X-Spam-Status: No, score=-3034.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Mon, 18 Apr 2022 13:46:13 -0000 On 2022-04-18 02:07, Mahesh Bodapati via Gdb wrote: > Hi All, > Target-linux-nat.c is the file for supporting native gdb? > for instance, I want to build a native gdb for MicroBlaze. > > '--host=microblazeel-xilinx-linux-gnu' > '--target=microblazeel-xilinx-linux-gnu' > > > 1. what are steps for building native gdb which are specific to > configure and flags. I'm not 100% sure I understand your question, but I assume you want to cross-compile GDB on an x86-64 build machine, so that GDB runs and debugs natively on a Microblaze Linux system. At the simplest, it will be something like: .../configure --host=microblazeel-xilinx-linu-gnu --sysroot= make But you will probably hit more problems that are typical of cross-compilation (not specific to GDB), like making sure you have all GDB dependencies built for Microblaze and installed in your sysroot. > 2. what files needs to be ported? and is there any guide for porting > native gdb ? GDB already supports Microblaze, see files gdb/microblaze* in the tree. However, we didn't have contributions that touched those files for a while, so it's possible these have bitrotted a little bit. Simon