0 Members and 2 Guests are viewing this topic.
Program received signal SIGSEGV, Segmentation fault.0x004018e5 in write_word ()(gdb) b data_abortBreakpoint 1 at 0x40aa00: file emu.c, line 112.(gdb) cContinuing.21:57:04.050,14-06-24,0000001605,refreshApList←[0m21:57:04.160,14-06-24,0000001616,Doc open complete in 0.85000002 seconds for: ndless/ndless_installer.tns←[0m21:57:04.160,14-06-24,0000001616,Memory avail before open: 35822688. Memory avail after open: 34665812. Memory used: 1156876←[0mIME: non-ALPHA key pressedProgram received signal SIGSEGV, Segmentation fault.0x004018e5 in write_word ()(gdb) cContinuing.Breakpoint 1, data_abort (mva=16843021, status=1 '\001') at emu.c:112warning: Source file is more recent than executable.112 void data_abort(u32 mva, u8 status) {(gdb) n113 logprintf(LOG_CPU, "Data abort: address=%08x status=%02x\n", mva, status);(gdb) n114 fix_pc_for_fault();(gdb) n118 cpu_exception(EX_DATA_ABORT);(gdb) print restart_after_exception$1 = {2686664, 16, 10767564, 13045723, 2686540, 4276596, 2686616, 0, 1447244336, 0, 0, 0, 0, 0, 0, 0}(gdb) info registerseax 0x4 4ecx 0xc784e1e 209210910edx 0x48dd8e4 76404964ebx 0x1 1esp 0x28fdec 0x28fdecebp 0x28fe04 0x28fe04esi 0x101010d 16843021edi 0xa44ccc 10767564eip 0x40aa32 0x40aa32 <data_abort+50>eflags 0x216 [ PF AF IF ]cs 0x23 35ss 0x2b 43ds 0x2b 43es 0x2b 43fs 0x53 83gs 0x2b 43(gdb) n115 arm.reg[15] += 8;(gdb) n116 arm.fault_address = mva;(gdb) n117 arm.data_fault_status = status;(gdb) n118 cpu_exception(EX_DATA_ABORT);(gdb) n119 longjmp(restart_after_exception, 0);(gdb) print restart_after_exception$2 = {2686664, 16, 10767564, 13045723, 2686540, 4276596, 2686616, 0, 1447244336, 0, 0, 0, 0, 0, 0, 0}(gdb) info registerseax 0x102fd904 271571204ecx 0x0 0edx 0x20000013 536870931ebx 0x1 1esp 0x28fdec 0x28fdecebp 0x28fe04 0x28fe04esi 0x101010d 16843021edi 0xa44ccc 10767564eip 0x40aa51 0x40aa51 <data_abort+81>eflags 0x202 [ IF ]cs 0x23 35ss 0x2b 43ds 0x2b 43es 0x2b 43fs 0x53 83gs 0x2b 43(gdb) n0x00401982 in longjmp ()(gdb) print restart_after_exception$3 = {2686664, 16, 10767564, 13045723, 2686540, 4276596, 2686616, 0, 1447244336, 0, 0, 0, 0, 0, 0, 0}(gdb) info registerseax 0x102fd904 271571204ecx 0x40aa65 4237925edx 0x20000013 536870931ebx 0x1 1esp 0x28fdec 0x28fdecebp 0x28fe04 0x28fe04esi 0x101010d 16843021edi 0xa44ccc 10767564eip 0x401982 0x401982 <longjmp+1>eflags 0x202 [ IF ]cs 0x23 35ss 0x2b 43ds 0x2b 43es 0x2b 43fs 0x53 83gs 0x2b 43(gdb) nSingle stepping until exit from function longjmp,which has no line number information.main (argc=0, argv=0x0) at emu.c:550550 while (!exiting) {(gdb) print restart_after_exception$4 = {2686664, 16, 10767564, 13045723, 2686540, 4276596, 2686616, 0, 1447244336, 0, 0, 0, 0, 0, 0, 0}(gdb) info registerseax 0x0 0ecx 0xa44040 10764352edx 0x20000013 536870931ebx 0x28fec8 2686664esp 0x10 0x10ebp 0xa44ccc 0xa44ccc <arm+204>esi 0xc70fdb 13045723edi 0x28fe4c 2686540eip 0x414174 0x414174 <main+2068>eflags 0x202 [ IF ]cs 0x23 35ss 0x2b 43ds 0x2b 43es 0x2b 43fs 0x53 83gs 0x2b 43(gdb) n551 sched_process_pending_events();(gdb) print restart_after_exception$5 = {2686664, 16, 10767564, 13045723, 2686540, 4276596, 2686616, 0, 1447244336, 0, 0, 0, 0, 0, 0, 0}(gdb) info registerseax 0x0 0ecx 0xa44040 10764352edx 0x20000013 536870931ebx 0x28fec8 2686664esp 0x10 0x10ebp 0xa44ccc 0xa44ccc <arm+204>esi 0xc70fdb 13045723edi 0x28fe4c 2686540eip 0x414181 0x414181 <main+2081>eflags 0x246 [ PF ZF IF ]cs 0x23 35ss 0x2b 43ds 0x2b 43es 0x2b 43fs 0x53 83gs 0x2b 43(gdb) nProgram received signal SIGSEGV, Segmentation fault.main (argc=0, argv=0x0) at emu.c:551551 sched_process_pending_events();(gdb)
Using built-in specs.COLLECT_GCC=i686-w64-mingw32-gccCOLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-w64-mingw32/4.9.0/lto-wrapperTarget: i686-w64-mingw32Configured with: /build/mingw-w64-gcc/src/gcc-4.9.0/configure --prefix=/usr --libexecdir=/usr/lib --target=i686-w64-mingw32 --enable-languages=c,lto,c++,objc,obj-c++,fortran,ada--enable-shared --enable-static --enable-threads=posix --enable-fully-dynamic-string --enable-libstdcxx-time=yes --with-system-zlib --enable-cloog-backend=isl--disable-cloog-version-check --disable-isl-version-check --enable-lto --disable-dw2-exceptions --enable-libgomp --disable-multilib --enable-checking=releaseThread model: posixgcc version 4.9.0 (GCC)
By the way. Given that we have two repos with similar content now, I think we should merge them into one and start working in one organization repo with some conventions like for example git-flow.
It took me a while see it... I'm a noob with this code...Now what? Have you reported to mingw? Any hotfix?
Starting program: c:\Users\............................\nspire_emu\src/nspire_emu.exe -1=boot1cx.img -f=flash.bin[New Thread 1600.0x710][New Thread 1600.0x884][New Thread 1600.0xa1c]Hardware watchpoint 1: restart_after_exception[1]Old value = 0New value = 160x75e9e27e in setjmp3 () from C:\Windows\SysWOW64\msvcrt.dll(gdb)(gdb) cContinuing....................................................................... (Tons of output...)Program received signal SIGSEGV, Segmentation fault.0x004018e5 in write_word ()(gdb)Continuing.Program received signal SIGSEGV, Segmentation fault.main (argc=0, argv=0x0) at emu.c:551551 sched_process_pending_events();(gdb)
$ gdb nspire_emu.exeGNU gdb (GDB) 7.6.1Copyright (C) 2013 Free Software Foundation, Inc.License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>This is free software: you are free to change and redistribute it.There is NO WARRANTY, to the extent permitted by law. Type "show copying"and "show warranty" for details.This GDB was configured as "mingw32".For bug reporting instructions, please see:<http://www.gnu.org/software/gdb/bugs/>...Reading symbols from c:\Users\....................\nspire_emu\src\nspire_emu.exe...done.(gdb) b main:546Breakpoint 1 at 0x41396c: file emu.c, line 260.(gdb) b emu.c:546Breakpoint 2 at 0x414140: file emu.c, line 546.(gdb) watch restart_after_exception[1]Hardware watchpoint 3: restart_after_exception[1](gdb) run -1=boot1cx.img -f=flash.binStarting program: c:\Users\..................\nspire_emu\src/nspire_emu.exe -1=boot1cx.img -f=flash.bin[New Thread 2604.0x804]Breakpoint 1, main (argc=3, argv=0xc429e0) at emu.c:260warning: Source file is more recent than executable.260 char *preload_filename[4] = { NULL };(gdb) cContinuing.[New Thread 2604.0x3ac][New Thread 2604.0x94c]Breakpoint 2, main (argc=3, argv=0xc429e0) at emu.c:546546 sched_update_next_event(0);(gdb) n543 sched_items[SCHED_THROTTLE].clock = CLOCK_27M;(gdb)544 sched_items[SCHED_THROTTLE].proc = throttle_interval_event;(gdb)546 sched_update_next_event(0);(gdb)548 setjmp(restart_after_exception);(gdb) si0x00414168 548 setjmp(restart_after_exception);(gdb)0x0041416f 548 setjmp(restart_after_exception);(gdb)0x004138a8 in _setjmp3 ()(gdb)0x75e9e275 in setjmp3 () from C:\Windows\SysWOW64\msvcrt.dll(gdb)0x75e9e279 in setjmp3 () from C:\Windows\SysWOW64\msvcrt.dll(gdb)0x75e9e27b in setjmp3 () from C:\Windows\SysWOW64\msvcrt.dll(gdb)Hardware watchpoint 3: restart_after_exception[1]Old value = 0New value = 160x75e9e27e in setjmp3 () from C:\Windows\SysWOW64\msvcrt.dll(gdb) disassemble setjmp3Dump of assembler code for function setjmp3: 0x75e9e275 <+0>: mov 0x4(%esp),%edx 0x75e9e279 <+4>: mov %ebp,(%edx) 0x75e9e27b <+6>: mov %ebx,0x4(%edx)=> 0x75e9e27e <+9>: mov %edi,0x8(%edx) 0x75e9e281 <+12>: mov %esi,0xc(%edx) 0x75e9e284 <+15>: mov %esp,0x10(%edx) 0x75e9e287 <+18>: mov (%esp),%eax 0x75e9e28a <+21>: mov %eax,0x14(%edx) 0x75e9e28d <+24>: movl $0x56433230,0x20(%edx) 0x75e9e294 <+31>: movl $0x0,0x24(%edx) 0x75e9e29b <+38>: mov %fs:0x0,%eax 0x75e9e2a1 <+44>: mov %eax,0x18(%edx) 0x75e9e2a4 <+47>: cmp $0xffffffff,%eax 0x75e9e2a7 <+50>: je 0x75ed992d <setjmp+56> 0x75e9e2ad <+56>: mov 0x8(%esp),%ecx 0x75e9e2b1 <+60>: or %ecx,%ecx 0x75e9e2b3 <+62>: jne 0x75ed9939 <setjmp+68> 0x75e9e2b9 <+68>: mov 0xc(%eax),%eax 0x75e9e2bc <+71>: mov %eax,0x1c(%edx) 0x75e9e2bf <+74>: sub %eax,%eax 0x75e9e2c1 <+76>: ret 0x75e9e2c2 <+77>: nop 0x75e9e2c3 <+78>: nop 0x75e9e2c4 <+79>: nop 0x75e9e2c5 <+80>: nop 0x75e9e2c6 <+81>: nopEnd of assembler dump.(gdb)
emuprintf("Ndless not detected or too old. Debugging of applications not available!\n");
It's pretty awesome to see someone porting Nspire-emu to Linux by the way. You're doing a great job.
Greetings help a lot
An important question is where to start. First GUI, then "kernel"?I'd go for the first, as that could be tested with wine accurately.QuoteGreetings help a lot Well, have some:Hi! Hi! Hi! Hi! Hello! Hello! Hello! Hello! Hello! Hello! Hey! Hey! Hey! 'sup? 'sup? 'sup? 'sup?