diff --git a/trunk/research/arm/jmp_sp.cpp b/trunk/research/arm/jmp_sp.cpp index b4876ab2b..fb5df11c2 100644 --- a/trunk/research/arm/jmp_sp.cpp +++ b/trunk/research/arm/jmp_sp.cpp @@ -46,7 +46,23 @@ void func0() * functions as a setjmp/longjmp replacement wherever they are available * unless USE_LIBC_SETJMP is defined. */ - // for glibc 2.4+, it's not possible to get and set the sp in jmp_buf + // for glibc 2.4+, it's not possible to get and set the sp in jmp_buf + /** + for example, the following is show the jmp_buf when setjmp: + (gdb) x /64xb env_func1[0].__jmpbuf + 0x600ca0 : 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 + 0x600ca8 : 0xf8 0xc1 0x71 0xe5 0xa8 0x88 0xb4 0x15 + 0x600cb0 : 0xa0 0x05 0x40 0x00 0x00 0x00 0x00 0x00 + 0x600cb8 : 0x90 0xe4 0xff 0xff 0xff 0x7f 0x00 0x00 + 0x600cc0 : 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 + 0x600cc8 : 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 + 0x600cd0 : 0xf8 0xc1 0x51 0xe5 0xa8 0x88 0xb4 0x15 + 0x600cd8 : 0xf8 0xc1 0xd9 0x2f 0xd7 0x77 0x4b 0xea + (gdb) p /x $sp + $4 = 0x7fffffffe380 + we cannot finger the sp out. + where the glibc is 2.12. + */ register long int rsp0 asm("rsp"); int ret = setjmp(env_func1); diff --git a/trunk/research/st/Makefile b/trunk/research/st/Makefile index 7b5cf0316..ce35b2778 100755 --- a/trunk/research/st/Makefile +++ b/trunk/research/st/Makefile @@ -124,7 +124,7 @@ $(SRS): $(OBJS) $(TARGETDIR)/md.o: md.S $(CC) $(CFLAGS) -c $< -o $@ -$(TARGETDIR)/%.o: %.c common.h md.h +$(TARGETDIR)/%.o: %.c common.h md.h Makefile $(CC) $(CFLAGS) -c $< -o $@ clean: