From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw1-x112d.google.com (mail-yw1-x112d.google.com [IPv6:2607:f8b0:4864:20::112d]) by sourceware.org (Postfix) with ESMTPS id 848483858C50 for ; Tue, 19 Apr 2022 06:31:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 848483858C50 Received: by mail-yw1-x112d.google.com with SMTP id 00721157ae682-2ef5380669cso144869937b3.9 for ; Mon, 18 Apr 2022 23:31:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YTS1r6gGTCsw+OmTQAzECudv2hdd3jSlqqNeOZb6f2A=; b=YA2FULIrhW+dopT7v7YaZH5YD0zv2RsqWjA3mRUGljLRNFYw+UV8cwUrTzud8bAgDH 4dd+vuAWqdREQv6XVLHgNHFmCCnekLL9f3sYXT+eTaJ2dBXfcPoSF7uGki8p84z3Zg/A 4qWhjOQbmCrkBTmNKRKzxvpxqlBbgWZUNDZ/IDaPRgzII5F+agQEASuf8+6TRoS0vxzZ 70D5lv4QSjdM5KOTsnBFLBoxnxfOxDvRXEtZWQa3X4gT74STnQ6Er7UYSaXO0FmZAmRe 4IUBA5x9lOXZ5tQXvPNCJSLwDq6NoXdoZR2Pk3uhc1YHVnda30oGVWy65kg++KifiqpN I0Fw== X-Gm-Message-State: AOAM531S9FDb5faiqvZRpPIgKoGRD/CMU7AWjO+qFtfO84MbBe0frz4S oLlbWAI9WGBXnaKx+A6USjwVHR5wImrafJwFDcU= X-Google-Smtp-Source: ABdhPJwYfN7fxTgVFbuJ6fKBWcBA5F3oC0G0wg2D5SirSFTIQ4kzI08tMjrMSb7ok/slrPBHupompv9VVahbFV5V0lI= X-Received: by 2002:a0d:e4c2:0:b0:2f1:8bfd:61b3 with SMTP id n185-20020a0de4c2000000b002f18bfd61b3mr8435794ywe.6.1650349877764; Mon, 18 Apr 2022 23:31:17 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Mahesh Bodapati Date: Tue, 19 Apr 2022 12:01:07 +0530 Message-ID: Subject: Re: native gdb To: Simon Marchi Cc: gdb@sourceware.org X-Spam-Status: No, score=1.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: Tue, 19 Apr 2022 06:31:20 -0000 Thanks Simon, >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. build !=3D host =3D=3D target (=E2=80=9Ccross-native=E2=80=9D) native toolchain, as it targets the same machine as it runs on. But it is build on another machine. >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. I didn't see any issues while I compile cross-compile gdb which runs on x86 and I assume 'microblaze-linux-nat.c' has to be ported/added as similar to other target to make it run on a target natively and also files to be ported for MicroBlaze at " gdb/nat/" Am I correct here? Please help me understand in detail. On Mon, Apr 18, 2022 at 7:16 PM Simon Marchi wrote: > > > 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=3Dmicroblazeel-xilinx-linux-gnu' > > '--target=3Dmicroblazeel-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=3Dmicroblazeel-xilinx-linu-gnu --sysroot=3D 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 >