public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@polymtl.ca>
To: Mahesh Bodapati <maheshbodapati212@gmail.com>, gdb@sourceware.org
Subject: Re: native gdb
Date: Mon, 18 Apr 2022 09:46:03 -0400	[thread overview]
Message-ID: <f211f6cd-7570-cf9d-1ef7-ed19438980f0@polymtl.ca> (raw)
In-Reply-To: <CACSfpVYVco1-hnov3Urn2UKHK2vfsJ_e4WXpuufbj8m6c3VJXg@mail.gmail.com>



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=<path to 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

  reply	other threads:[~2022-04-18 13:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-18  6:07 Mahesh Bodapati
2022-04-18 13:46 ` Simon Marchi [this message]
2022-04-19  6:31   ` Mahesh Bodapati
2022-04-19 20:15     ` Simon Marchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f211f6cd-7570-cf9d-1ef7-ed19438980f0@polymtl.ca \
    --to=simon.marchi@polymtl.ca \
    --cc=gdb@sourceware.org \
    --cc=maheshbodapati212@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).