[uClinux-dev] gdbserver kills the shell? FIXED

Javier Cardona javier at cozybit.com
Mon Oct 24 17:15:11 EDT 2005


Hi,

The SIGILL exceptions were caused by gdb trying to continue from the position 
following the breakpoint.  This solved my problem:

--- gdb/config/m68k/tm-monitor.h.orig   2005-10-24 14:09:24.559011992 -0700
+++ gdb/config/m68k/tm-monitor.h        2005-10-24 14:01:02.102397008 -0700
@@ -30,7 +30,7 @@

 /* The target system handles breakpoints.  */

-#define DECR_PC_AFTER_BREAK 0
+#define DECR_PC_AFTER_BREAK 2

 /* No float registers.  */

Cheers,

On Friday 21 October 2005 05:02 pm, Javier Cardona wrote:
> Hi,
>
>
> I've tried the patch provided by Stuart
> ( http://mailman.uclinux.org/pipermail/uclinux-dev/2005-October/034905.html
> ) on a M5275EVB, and the symbols do get relocated to their runtime
> addresses, but I'm still having SIGILL signals when stepping through the
> code:
>
> (gdb) ta re t1:3000
> Remote debugging using t1:3000
> 0x01db0048 in _start ()
> (gdb) b f3
> Breakpoint 1 at 0x1db0090: file test3.c, line 17.
> (gdb) c
> Continuing.
>
> Program received signal SIGTRAP, Trace/breakpoint trap.
> 0x01db0092 in f3 () at test3.c:17
> 17              printf("this is f3()\n");
> (gdb) si
> 0x01db0094      17              printf("this is f3()\n");
> (gdb)
> 0x01db0098      17              printf("this is f3()\n");
> (gdb)
> 0x01db009a      17              printf("this is f3()\n");
> (gdb)
>
> Program received signal SIGILL, Illegal instruction.
> 0x01db009a in f3 () at test3.c:17
> 17              printf("this is f3()\n");
>
>
> Also, I had to modify the makefile that's part of to compile the code.  I'm
> posting my changes here in case they are useful to anyone.
>
> ------------------------------------
> --- uClinux-dist/user/gdb.orig/makefile 2005-10-21 13:25:24.000000000 -0700
> +++ uClinux-dist/user/gdb/makefile      2005-10-21 16:36:30.475658184 -0700
> @@ -5,13 +5,13 @@
>  build/build: makefile
>         rm -rf build
>         mkdir build
> -       (cd build; ../gdb/gdbserver/configure --target=$(CROSS_COMPILE:-=))
> +       (cd build; ../gdb/gdbserver/configure
> --target=$(CROSS_COMPILE:-=)-linux-gnu)
>         touch build/build
>
>  host/build: makefile
>         rm -rf host
>         mkdir host
> -       (cd host; CC= CFLAGS= ../configure --target=$(CROSS_COMPILE:-=))
> +       (cd host; CC= CFLAGS= LDFLAGS= ../configure
> --target=$(CROSS_COMPILE:-=))
>         touch host/build
>
>  clean:
> ------------------------------------
>
> cheers,

-- 
Javier Cardona
cozybit Inc.





More information about the uClinux-dev mailing list