Re: native gdb

Simon Marchi via Gdb <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>

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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.