Hi Matt, Matt Waddel wrote:
I was looking at the common entry.S file in the latest 5307 directory and found that a small patch has been left out. Without this patch gdbserver and strace don't work correctly. (I believe the original authors are Philippe De Muyter and Stuart Hughes.) Could you apply this patch?
Applied. Thanks Greg
strace output without the patch ----------------------------------------- # strace ls execve("/bin/ls", ["ls"], [/* 5 vars */]) = 0 bin etc lib mnt proc sbin tmp var dev home linuxrc opt root sys usr # strace output with the patch ------------------------------------- # strace ls execve("/bin/ls", ["ls"], [/* 5 vars */]) = 0 ioctl(0, SNDCTL_TMR_TIMEBASE, {B115200 opost isig icanon echo ...}) = 0 ioctl(1, SNDCTL_TMR_TIMEBASE, {B115200 opost isig icanon echo ...}) = 0 getuid32() = 0 getgid32() = 0 setgid32(0) = 0 setuid32(0) = 0 ioctl(1, SNDCTL_TMR_TIMEBASE, {B115200 opost isig icanon echo ...}) = 0 ioctl(1, SNDCTL_TMR_TIMEBASE, {B115200 opost isig icanon echo ...}) = 0 lstat(".", {st_mode=S_IFDIR|0755, st_size=32, ...}) = 0 open(".", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = 3 fstat(3, {st_mode=S_IFDIR|0755, st_size=32, ...}) = 0 fcntl(3, F_SETFD, FD_CLOEXEC) = 0 (a lot more stuff) ... ------------------------------------------------------------------------ diff --git a/arch/m68knommu/platform/5307/entry.S b/arch/m68knommu/platform/5307/entry.S index a8cd867..b333731 100644 --- a/arch/m68knommu/platform/5307/entry.S +++ b/arch/m68knommu/platform/5307/entry.S @@ -74,7 +74,8 @@ ENTRY(system_call) movel %sp,%d2 /* get thread_info pointer */ andl #-THREAD_SIZE,%d2 /* at start of kernel stack */ movel %d2,%a0 - movel %sp,%a0@(THREAD_ESP0) /* save top of frame */ + movel %a0@,%a1 /* save top of frame */ + movel %sp,%a1@(TASK_THREAD+THREAD_ESP0) btst #(TIF_SYSCALL_TRACE%8),%a0@(TI_FLAGS+(31-TIF_SYSCALL_TRACE)/8) bnes 1f@@ -83,6 +84,8 @@ ENTRY(system_call)movel %d0,%sp@(PT_D0) /* save the return value */ jra ret_from_exception 1: + movel #-ENOSYS,%d2 /* strace needs -ENOSYS in PT_D0 */ + movel %d2,PT_D0(%sp) /* on syscall entry */ subql #4,%sp SAVE_SWITCH_STACK jbsr syscall_trace ------------------------------------------------------------------------ _______________________________________________ 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
-- ------------------------------------------------------------------------ Greg Ungerer -- Chief Software Dude EMAIL: [EMAIL PROTECTED] Secure Computing Corporation PHONE: +61 7 3435 2888 825 Stanley St, FAX: +61 7 3891 3630 Woolloongabba, QLD, 4102, Australia WEB: http://www.SnapGear.com _______________________________________________ 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
