Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
19 years ago

Building gdb server

hello all,

I tried to rebuild the kernel with gdb server. I use make menuconfig,and enable the gdbserver in the "Miscellaneous Applications", I got a build error. Below are snippets of it.

make: Entering directory `/home/uclinux/uClinux-dist/user/gdb'
rm -rf build
mkdir build
(cd build; sh ../gdb/gdbserver/configure --build= --host=nios2-linux-uclibc --build=i686-pc-linux-gnu --target=nios2-linux-uclibc --with-readline --disable-nls)
creating cache ./config.cache
checking for gcc... nios2-linux-uclibc-gcc
checking whether the C compiler (nios2-linux-uclibc-gcc -O1 -g  -Dlinux -D__linux__ -Dunix -D__uClinux__ -DEMBED   -I/home/uclinux/uClinux-dist -fno-builtin -O1 -g  -Dlinux -D__linux__ -Dunix -D__uClinux__ -DEMBED   -I/home/uclinux/uClinux-dist -fno-builtin -Wl,-d -Wl,-elf2flt) works... yes
checking whether the C compiler (nios2-linux-uclibc-gcc -O1 -g  -Dlinux -D__linux__ -Dunix -D__uClinux__ -DEMBED   -I/home/uclinux/uClinux-dist -fno-builtin -O1 -g  -Dlinux -D__linux__ -Dunix -D__uClinux__ -DEMBED   -I/home/uclinux/uClinux-dist -fno-builtin -Wl,-d -Wl,-elf2flt) is a cross-compiler... yes
checking whether we are using GNU C... yes
checking whether nios2-linux-uclibc-gcc accepts -g... yes
checking host system type... nios2-altera-linux-gnu
checking target system type... nios2-altera-linux-gnu
checking build system type... i686-pc-linux-gnu
checking for a BSD compatible install... /usr/bin/install -c
checking how to run the C preprocessor... nios2-linux-uclibc-gcc -E
checking for ANSI C header files... yes
checking for sgtty.h... yes
checking for termio.h... yes
checking for termios.h... yes
checking for sys/reg.h... no
checking for string.h... yes
checking for proc_service.h... no
checking for sys/procfs.h... yes
checking for thread_db.h... yes
checking for linux/elf.h... yes
checking for stdlib.h... yes
checking for unistd.h... yes
checking whether strerror must be declared... no
Error: target not supported by gdbserver.
make: ***  Error 1
make: Leaving directory `/home/uclinux/uClinux-dist/user/gdb'
make: ***  Error 2
make: Leaving directory `/home/uclinux/uClinux-dist/user'
make: ***  Error 2
make: Leaving directory `/home/uclinux/uClinux-dist/user'
make: ***  Error 1
uclinux@colinux:~/uClinux-dist$

Can anyone help ? I am trying to debug a user application using Eclipse IDE with gdb server running on the nios2.

Thanks.

3 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I am working on Nios2 from 1.5 years. I tried compiling GDB for a long time and finally gave up. I use prints which is much easier than using GDB anyways. So, Sorry. Cant help you with GDB. Go for prints, its damn easy to debug.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I understand the frustration of not being able to get gdb running ...

    The thing is if anyone is serious about programming C for the NIOS, it is essential that GDB can run.

    printf's are ok, but it gets messy when the code is hugh.

    It seems there might be light since hippo mention the gdb is available on the linux version of QuartusII 6.1 and EDS 6.1.

    I think most difficult part is to get gdb-server compiled (for running in NIOS)