Do you have any other m68k*gdb* execs? I've been successful in use gdbserver in the past, however I was using m68k-bdm-elf-gdb and I'm not familiar at all with Codesourcery's gdb.
Best of luck, Chris > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:uclinux-dev- > [EMAIL PROTECTED] On Behalf Of Markus Franke > Sent: April 2, 2008 9:59 AM > To: [email protected] > Subject: [uClinux-dev] Using gdb/gdbserver on m68knommu target > > Dear uClinux Developers/Users, > > I have some problems when trying to debug applications by using > gdbserver/gdb. Some details of my environment: > > target: m68knommu/MCF548x > uClinux-dist-20070130 (without any patches - might this already be my > problem???) > Linux Kernel 2.6.x > m68-uclinux-gdb 6.6 (from the latest Codesourcery Toolchain) > > A simple hello world application is used: > > ---snip--- > #include <stdio.h> > int main(void) > { > printf("Hello World!!!\n"); > return 0; > } > ---snip--- > > The following Makefile was used for compilation: > > ---snip--- > SOURCE=test > GCC=m68k-uclinux-gcc > CFLAGS=-Wall -mcfv4e -msep-data -Wl,-elf2flt -Wl,-move-rodata -g > > default: test.c > ucfront-gcc $(GCC) $(CFLAGS) -o $(SOURCE) $(SOURCE).c > ---snap--- > > Everything builds fine without any errors. > Furthermore, I am using gdbserver from "config_menuconfig -> > Miscellaneous Applications" and PTHREADS_DEBUG_SUPPORT is switched on > in my uClibc configuration. > > The application is started by "gdbserver :3000 test" on the target and > gdbserver listens for a new connection. Next I do: > > m68k-uclinux-gdb test.gdb > > and > > target remote <target_ip>:3000 > > So far so good. I can connect to the target but gdb tells me: > > ---snip--- > (gdb) target remote board:3000 > Remote debugging using board:3000 > 0x03cac048 in ?? () > ---snap--- > > A call to "b main" delivers: > > ---snip--- > Cannot access memory at address 0xb8 > ---snap--- > > It seems like my symbol file is somehow broken or is being built in a > wrong way, right? GDB tries to access the target at address 0xb8 where > it expects to find the entry point to the main function. But as the > target tells me above, the main function is relocated to address > 0x03cac048, isn't it? > > I am not an expert in using gdb/gdbserver but I have the feeling that > it is just a small thing which I am missunderstanding. ;-) > > Thanks for any comments on this and with best regards, > > Markus Franke > > > _______________________________________________ > uClinux-dev mailing list > [email protected] > http://mailman.uclinux.org/mailman/listinfo/uclinux-dev > This message was resent by [email protected] > To unsubscribe see: > http://mailman.uclinux.org/mailman/options/uclinux-dev _______________________________________________ uClinux-dev mailing list [email protected] http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by [email protected] To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev
