I have compiled gdb-5.3 for a custom board running mips:
gdb-5.3/gdb/configure --target mipseb-linux-elf
while running gdb on the host I got:
[test@dragun usr]$ ~test/gdb/bin/host/gdb demo
GNU gdb 5.3
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu
(gdb) target remote 192.168.1.90:4444
Remote debugging using 192.168.1.90:4444
0x6000e182 in ?? ()
(gdb) b printf
Breakpoint 1 at 0x8048370
Cannot find bounds of current function
The history is empty.
and on the target I got
/usr> ./gdbserver 192.168.1.1:4444 demo
Process demo created; pid = 27
Remote debugging from host 192.168.1.1
hello - #0
hello - #1
hello - #2
hello - #3
hello - #4
hello - #5
the program demo.c
printf("hello - #%d\n", i);
The problem is that I can't controll the gdbserver, it looks as if it
doesn't respond to commands (breakpoints,)
from the host gdb.