You are not logged in.
Glad that GDB breakpoints are now working for you!
I fixed (maybe) compiling on the GTK port in r5067. However, I can't actually test this (I can only make Cocoa and Windows builds), so I'm practically doing blind updates on anything other than Cocoa and Windows. I'm pretty sure I fixed it. If the GTK port is still broken, I might need to get our Linux guy in to help out with this.
Offline
Now it compiles from SVN trunk, and breakpoints work ... sort of, but e.g. source-level stepping puts it in a jam straight away, just like repeating the "si" command long enough. Missing mutex or something?
I checked that it's really the newest version
...
DeSmuME 0.9.11 svn5067 dev+ x86-JIT
Created GDB stub on port 20000
STALL
SoftRast Initialized with cores=2
...
CPU mode: Interpreter
Processing packet q
Processing packet H
Processing packet q
Processing packet ?
Processing packet H
Processing packet q
Processing packet q
Processing packet g
'g' command PC = 02000000
...
My build procedure is like this
svn checkout svn://svn.code.sf.net/p/desmume/code/trunk/desmume desmume-svn
cd desmume-svn
./autogen.sh
CFLAGS='-O2 -march=native' CXXFLAGS=$CFLAGS ./configure --enable-gdb-stub ; make ; sudo make install
Anyway, I'll try to find out what's happening. I learned my way around the source code pretty well already when trying to understand why breakpoints and source-line stepping don't work on the Mac port.
Offline
I also tried making with optimization level -O1 in CFLAGS, but it didn't make any difference, source-level stepping still jams the emulator. On the Mac it works and is very fast, you can just type S and hold down Enter, it will print new source lines at the keyrepeat rate.
Offline
you mentioned something about a race condition early on, and im pretty sure youre right about that. theres something fundamentally foul ive smelled, but ive never digged into it, and for some reason it doesnt strike some people. i think spamming source steps is the prime way of causing it, too (like a second source step can happen before the first one completes)
Offline
FWIW, probably not much, I tried running the program in Valgrind's Data Race Detection tool DRD. Here's the command I used to start Valgrind:
valgrind --log-file=./valgrind_log2.txt --error-limit=no --tool=drd --read-var-info=yes desmume-cli --arm9gdb=20000 AllocationTest.nds
After DeSmuME had loaded up and displayed its graphics window, I started GDB in another terminal, with commands "target remote :20000" etc and finally I gave the Step command.
As expeted it's giving tons of error messages (gdb-related excerpt from the log file)
...
==13042== Conflicting store by thread 1 at 0x082f54ec size 4
==13042== at 0x8053D73: stall_cpu(void*) (armcpu.cpp:62)
==13042== by 0x827300F: step_instruction_watch(void*, unsigned int, int) (gdbstub.cpp:214)
==13042== by 0x8055576: unsigned int armcpu_exec<0>() (armcpu.cpp:689)
==13042== by 0x80FFB94: std::pair<int, int> armInnerLoop<true, true, false>(unsigned long long, int, int, int) (NDSSystem.cpp:1725)
==13042== by 0x81073C4: void NDS_exec<false>(int) (NDSSystem.cpp:1878)
==13042== by 0x80526C4: desmume_cycle(ctrls_event_config*) (main.cpp:482)
==13042== by 0x453DE45: (below main) (libc-start.c:244)
==13042== Location 0x82f54ec is 0 bytes inside NDS_ARM9.stalled,
==13042== a global variable declared at armcpu.cpp:46
==13042== Other segment start (thread 3)
==13042== at 0x40309DA: sem_post@* (drd_pthread_intercepts.c:1059)
==13042== by 0x40AE26E: SDL_SemPost (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x40644B7: ??? (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x40ADD3A: ??? (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x4513C38: start_thread (pthread_create.c:304)
==13042== by 0x45FE9FD: clone (clone.S:130)
==13042== Other segment end (thread 3)
==13042== at 0x45F7D01: ??? (syscall-template.S:82)
==13042== Other segment start (thread 3)
==13042== at 0x40309DA: sem_post@* (drd_pthread_intercepts.c:1059)
==13042== by 0x40AE26E: SDL_SemPost (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x40644B7: ??? (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x40ADD3A: ??? (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x4513C38: start_thread (pthread_create.c:304)
==13042== by 0x45FE9FD: clone (clone.S:130)
==13042== Other segment end (thread 3)
==13042== at 0x45F7D01: ??? (syscall-template.S:82)
==13042==
==13042== Conflicting store by thread 1 at 0x082f54f4 size 4
==13042== at 0x8053CF4: remove_post_exec_fn(void*) (armcpu.cpp:86)
==13042== by 0x827301B: step_instruction_watch(void*, unsigned int, int) (gdbstub.cpp:217)
==13042== by 0x8055576: unsigned int armcpu_exec<0>() (armcpu.cpp:689)
==13042== by 0x80FFB94: std::pair<int, int> armInnerLoop<true, true, false>(unsigned long long, int, int, int) (NDSSystem.cpp:1725)
==13042== by 0x81073C4: void NDS_exec<false>(int) (NDSSystem.cpp:1878)
==13042== by 0x80526C4: desmume_cycle(ctrls_event_config*) (main.cpp:482)
==13042== by 0x453DE45: (below main) (libc-start.c:244)
==13042== Location 0x82f54f4 is 0 bytes inside NDS_ARM9.post_ex_fn,
==13042== a global variable declared at armcpu.cpp:46
==13042== Other segment start (thread 3)
==13042== at 0x40309DA: sem_post@* (drd_pthread_intercepts.c:1059)
==13042== by 0x40AE26E: SDL_SemPost (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x40644B7: ??? (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x40ADD3A: ??? (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x4513C38: start_thread (pthread_create.c:304)
==13042== by 0x45FE9FD: clone (clone.S:130)
==13042== Other segment end (thread 3)
==13042== at 0x45F7D01: ??? (syscall-template.S:82)
==13042==
==13042== Conflicting store by thread 1 at 0x04ffc8ec size 4
==13042== at 0x8273022: step_instruction_watch(void*, unsigned int, int) (gdbstub.cpp:220)
==13042== by 0x8055576: unsigned int armcpu_exec<0>() (armcpu.cpp:689)
==13042== by 0x80FFB94: std::pair<int, int> armInnerLoop<true, true, false>(unsigned long long, int, int, int) (NDSSystem.cpp:1725)
==13042== by 0x81073C4: void NDS_exec<false>(int) (NDSSystem.cpp:1878)
==13042== by 0x80526C4: desmume_cycle(ctrls_event_config*) (main.cpp:482)
==13042== by 0x453DE45: (below main) (libc-start.c:244)
==13042== Address 0x4ffc8ec is at offset 2196 from 0x4ffc058. Allocation context:
==13042== at 0x402A2B8: malloc (vg_replace_malloc.c:263)
==13042== by 0x8274B17: createStub_gdb(unsigned short, armcpu_t*, armcpu_memory_iface const*) (gdbstub.cpp:1456)
==13042== by 0x804EFDC: main (main.cpp:605)
==13042== Other segment start (thread 3)
==13042== at 0x40309DA: sem_post@* (drd_pthread_intercepts.c:1059)
==13042== by 0x40AE26E: SDL_SemPost (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x40644B7: ??? (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x40ADD3A: ??? (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x4513C38: start_thread (pthread_create.c:304)
==13042== by 0x45FE9FD: clone (clone.S:130)
==13042== Other segment end (thread 3)
==13042== at 0x45F7D01: ??? (syscall-template.S:82)
==13042==
==13042== Conflicting store by thread 1 at 0x082f560c size 4
==13042== at 0x8103577: NDS_debug_break() (NDSSystem.cpp:1781)
==13042== by 0x8055576: unsigned int armcpu_exec<0>() (armcpu.cpp:689)
==13042== by 0x80FFB94: std::pair<int, int> armInnerLoop<true, true, false>(unsigned long long, int, int, int) (NDSSystem.cpp:1725)
==13042== by 0x81073C4: void NDS_exec<false>(int) (NDSSystem.cpp:1878)
==13042== by 0x80526C4: desmume_cycle(ctrls_event_config*) (main.cpp:482)
==13042== by 0x453DE45: (below main) (libc-start.c:244)
==13042== Location 0x82f560c is 0 bytes inside NDS_ARM7.stalled,
==13042== a global variable declared at armcpu.cpp:45
==13042== Other segment start (thread 3)
==13042== at 0x40309DA: sem_post@* (drd_pthread_intercepts.c:1059)
==13042== by 0x40AE26E: SDL_SemPost (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x40644B7: ??? (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x40ADD3A: ??? (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x4513C38: start_thread (pthread_create.c:304)
==13042== by 0x45FE9FD: clone (clone.S:130)
==13042== Other segment end (thread 3)
==13042== at 0x45F7D01: ??? (syscall-template.S:82)
==13042==
==13042== Conflicting store by thread 1 at 0x082f54ec size 4
==13042== at 0x8103581: NDS_debug_break() (NDSSystem.cpp:1781)
==13042== by 0x8055576: unsigned int armcpu_exec<0>() (armcpu.cpp:689)
==13042== by 0x80FFB94: std::pair<int, int> armInnerLoop<true, true, false>(unsigned long long, int, int, int) (NDSSystem.cpp:1725)
==13042== by 0x81073C4: void NDS_exec<false>(int) (NDSSystem.cpp:1878)
==13042== by 0x80526C4: desmume_cycle(ctrls_event_config*) (main.cpp:482)
==13042== by 0x453DE45: (below main) (libc-start.c:244)
==13042== Location 0x82f54ec is 0 bytes inside NDS_ARM9.stalled,
==13042== a global variable declared at armcpu.cpp:46
==13042== Other segment start (thread 3)
==13042== at 0x40309DA: sem_post@* (drd_pthread_intercepts.c:1059)
==13042== by 0x40AE26E: SDL_SemPost (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x40644B7: ??? (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x40ADD3A: ??? (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x4513C38: start_thread (pthread_create.c:304)
==13042== by 0x45FE9FD: clone (clone.S:130)
==13042== Other segment end (thread 3)
==13042== at 0x45F7D01: ??? (syscall-template.S:82)
==13042== Other segment start (thread 3)
==13042== at 0x40309DA: sem_post@* (drd_pthread_intercepts.c:1059)
==13042== by 0x40AE26E: SDL_SemPost (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x40644B7: ??? (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x40ADD3A: ??? (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x4513C38: start_thread (pthread_create.c:304)
==13042== by 0x45FE9FD: clone (clone.S:130)
==13042== Other segment end (thread 3)
==13042== at 0x45F7D01: ??? (syscall-template.S:82)
==13042==
==13042== Conflicting store by thread 1 at 0x082f5428 size 4
==13042== at 0x80555A3: unsigned int armcpu_exec<0>() (armcpu.cpp:416)
==13042== by 0x80FFB94: std::pair<int, int> armInnerLoop<true, true, false>(unsigned long long, int, int, int) (NDSSystem.cpp:1725)
==13042== by 0x81073C4: void NDS_exec<false>(int) (NDSSystem.cpp:1878)
==13042== by 0x80526C4: desmume_cycle(ctrls_event_config*) (main.cpp:482)
==13042== by 0x453DE45: (below main) (libc-start.c:244)
==13042== Location 0x82f5428 is 0 bytes inside NDS_ARM9.instruct_adr,
==13042== a global variable declared at armcpu.cpp:46
==13042== Other segment start (thread 3)
==13042== at 0x40309DA: sem_post@* (drd_pthread_intercepts.c:1059)
==13042== by 0x40AE26E: SDL_SemPost (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x40644B7: ??? (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x40ADD3A: ??? (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x4513C38: start_thread (pthread_create.c:304)
==13042== by 0x45FE9FD: clone (clone.S:130)
==13042== Other segment end (thread 3)
==13042== at 0x45F7D01: ??? (syscall-template.S:82)
==13042== Other segment start (thread 3)
==13042== at 0x40309DA: sem_post@* (drd_pthread_intercepts.c:1059)
==13042== by 0x40AE26E: SDL_SemPost (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x40644B7: ??? (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x40ADD3A: ??? (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x4513C38: start_thread (pthread_create.c:304)
==13042== by 0x45FE9FD: clone (clone.S:130)
==13042== Other segment end (thread 3)
==13042== at 0x45F7D01: ??? (syscall-template.S:82)
==13042==
But it's really hard to say what if anything any of that actually means. If a multi-threaded application is 100% perfect, then you don't get any errors? I don't know, I haven't used the tool that much. Many of the detected errors don't seem to have necessarily anything to do with the GDB stub functionality, like this from the very beginning of the log:
==13042== Conflicting load by thread 1 at 0x04abcb48 size 4
==13042== at 0x4A872B5: pa_once_begin (in /usr/lib/i386-linux-gnu/pulseaudio/libpulsecommon-2.0.so)
==13042== by 0x4A87495: pa_run_once (in /usr/lib/i386-linux-gnu/pulseaudio/libpulsecommon-2.0.so)
==13042== by 0x4A9E115: pa_thread_self (in /usr/lib/i386-linux-gnu/pulseaudio/libpulsecommon-2.0.so)
==13042== by 0x46C9CB3: pa_threaded_mainloop_lock (in /usr/lib/i386-linux-gnu/libpulse.so.0.14.2)
==13042== by 0x4045F89: pulse_connect (in /usr/lib/i386-linux-gnu/alsa-lib/libasound_module_pcm_pulse.so)
==13042== by 0x40456EE: _snd_pcm_pulse_open (in /usr/lib/i386-linux-gnu/alsa-lib/libasound_module_pcm_pulse.so)
==13042== by 0x4138707: ??? (in /usr/lib/i386-linux-gnu/libasound.so.2.0.0)
==13042== by 0x4138D3D: ??? (in /usr/lib/i386-linux-gnu/libasound.so.2.0.0)
==13042== by 0x825598A: Mic_Init() (mic_alsa.cpp:48)
==13042== by 0x80F4EB4: MMU_Init() (MMU.cpp:932)
==13042== by 0x453DE45: (below main) (libc-start.c:244)
==13042== Allocation context: BSS section of /usr/lib/i386-linux-gnu/pulseaudio/libpulsecommon-2.0.so
==13042== Other segment start (thread 2)
==13042== at 0x402C597: pthread_mutex_lock (drd_pthread_intercepts.c:615)
==13042== by 0x4A9CF5E: pa_mutex_lock (in /usr/lib/i386-linux-gnu/pulseaudio/libpulsecommon-2.0.so)
==13042== by 0x4A872F1: pa_once_begin (in /usr/lib/i386-linux-gnu/pulseaudio/libpulsecommon-2.0.so)
==13042== by 0x4A87495: pa_run_once (in /usr/lib/i386-linux-gnu/pulseaudio/libpulsecommon-2.0.so)
==13042== by 0x4513C38: start_thread (pthread_create.c:304)
==13042== by 0x45FE9FD: clone (clone.S:130)
==13042== Other segment end (thread 2)
==13042== at 0x402CD94: pthread_mutex_unlock (drd_pthread_intercepts.c:667)
==13042== by 0x4A9D12E: pa_mutex_unlock (in /usr/lib/i386-linux-gnu/pulseaudio/libpulsecommon-2.0.so)
==13042== by 0x4513C38: start_thread (pthread_create.c:304)
==13042== by 0x45FE9FD: clone (clone.S:130)
==13042==
==13042== Conflicting load by thread 1 at 0x04abcb4c size 4
==13042== at 0x4A9E116: pa_thread_self (in /usr/lib/i386-linux-gnu/pulseaudio/libpulsecommon-2.0.so)
==13042== by 0x46C9CB3: pa_threaded_mainloop_lock (in /usr/lib/i386-linux-gnu/libpulse.so.0.14.2)
==13042== by 0x4045F89: pulse_connect (in /usr/lib/i386-linux-gnu/alsa-lib/libasound_module_pcm_pulse.so)
==13042== by 0x40456EE: _snd_pcm_pulse_open (in /usr/lib/i386-linux-gnu/alsa-lib/libasound_module_pcm_pulse.so)
==13042== by 0x4138707: ??? (in /usr/lib/i386-linux-gnu/libasound.so.2.0.0)
==13042== by 0x4138D3D: ??? (in /usr/lib/i386-linux-gnu/libasound.so.2.0.0)
==13042== by 0x825598A: Mic_Init() (mic_alsa.cpp:48)
==13042== by 0x80F4EB4: MMU_Init() (MMU.cpp:932)
==13042== by 0x453DE45: (below main) (libc-start.c:244)
==13042== Allocation context: BSS section of /usr/lib/i386-linux-gnu/pulseaudio/libpulsecommon-2.0.so
==13042== Other segment start (thread 2)
==13042== at 0x402C597: pthread_mutex_lock (drd_pthread_intercepts.c:615)
==13042== by 0x4A9CF5E: pa_mutex_lock (in /usr/lib/i386-linux-gnu/pulseaudio/libpulsecommon-2.0.so)
==13042== by 0x4A872F1: pa_once_begin (in /usr/lib/i386-linux-gnu/pulseaudio/libpulsecommon-2.0.so)
==13042== by 0x4A87495: pa_run_once (in /usr/lib/i386-linux-gnu/pulseaudio/libpulsecommon-2.0.so)
==13042== by 0x4513C38: start_thread (pthread_create.c:304)
==13042== by 0x45FE9FD: clone (clone.S:130)
==13042== Other segment end (thread 2)
==13042== at 0x402CD94: pthread_mutex_unlock (drd_pthread_intercepts.c:667)
==13042== by 0x4A9D12E: pa_mutex_unlock (in /usr/lib/i386-linux-gnu/pulseaudio/libpulsecommon-2.0.so)
==13042== by 0x4513C38: start_thread (pthread_create.c:304)
==13042== by 0x45FE9FD: clone (clone.S:130)
...bug in ALSA or PulseAudio or whatever, or in the way they are used in DeSmuME? Or just a false alert, DRD being trigger happy?
More errors that come after the GDB excerpt:
==13042== Conflicting store by thread 1 at 0x082f5434 size 4
==13042== at 0x805B503: unsigned int OP_SUB_IMM_VAL<0>(unsigned int) (arm_instructions.cpp:620)
==13042== by 0x805554E: unsigned int armcpu_exec<0>() (armcpu.cpp:682)
==13042== by 0x80FFB94: std::pair<int, int> armInnerLoop<true, true, false>(unsigned long long, int, int, int) (NDSSystem.cpp:1725)
==13042== by 0x81073C4: void NDS_exec<false>(int) (NDSSystem.cpp:1878)
==13042== by 0x80526C4: desmume_cycle(ctrls_event_config*) (main.cpp:482)
==13042== by 0x453DE45: (below main) (libc-start.c:244)
==13042== Location 0x82f5434 is 0 bytes inside NDS_ARM9.R[1],
==13042== a global variable declared at armcpu.cpp:46
==13042== Other segment start (thread 3)
==13042== at 0x40309DA: sem_post@* (drd_pthread_intercepts.c:1059)
==13042== by 0x40AE26E: SDL_SemPost (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x40644B7: ??? (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x40ADD3A: ??? (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x4513C38: start_thread (pthread_create.c:304)
==13042== by 0x45FE9FD: clone (clone.S:130)
==13042== Other segment end (thread 3)
==13042== at 0x45F7D01: ??? (syscall-template.S:82)
==13042== Other segment start (thread 3)
==13042== at 0x40309DA: sem_post@* (drd_pthread_intercepts.c:1059)
==13042== by 0x40AE26E: SDL_SemPost (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x40644B7: ??? (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x40ADD3A: ??? (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x4513C38: start_thread (pthread_create.c:304)
==13042== by 0x45FE9FD: clone (clone.S:130)
==13042== Other segment end (thread 3)
==13042== at 0x45F7D01: ??? (syscall-template.S:82)
==13042==
==13042== Conflicting store by thread 1 at 0x082f5464 size 4
==13042== at 0x805AAA3: unsigned int OP_MOV_LSL_IMM<0>(unsigned int) (arm_instructions.cpp:1911)
==13042== by 0x805554E: unsigned int armcpu_exec<0>() (armcpu.cpp:682)
==13042== by 0x80FFB94: std::pair<int, int> armInnerLoop<true, true, false>(unsigned long long, int, int, int) (NDSSystem.cpp:1725)
==13042== by 0x81073C4: void NDS_exec<false>(int) (NDSSystem.cpp:1878)
==13042== by 0x80526C4: desmume_cycle(ctrls_event_config*) (main.cpp:482)
==13042== by 0x453DE45: (below main) (libc-start.c:244)
==13042== Location 0x82f5464 is 0 bytes inside NDS_ARM9.R[13],
==13042== a global variable declared at armcpu.cpp:46
==13042== Other segment start (thread 3)
==13042== at 0x40309DA: sem_post@* (drd_pthread_intercepts.c:1059)
==13042== by 0x40AE26E: SDL_SemPost (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x40644B7: ??? (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x40ADD3A: ??? (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x4513C38: start_thread (pthread_create.c:304)
==13042== by 0x45FE9FD: clone (clone.S:130)
==13042== Other segment end (thread 3)
==13042== at 0x45F7D01: ??? (syscall-template.S:82)
==13042== Other segment start (thread 3)
==13042== at 0x40309DA: sem_post@* (drd_pthread_intercepts.c:1059)
==13042== by 0x40AE26E: SDL_SemPost (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x40644B7: ??? (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x40ADD3A: ??? (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x4513C38: start_thread (pthread_create.c:304)
==13042== by 0x45FE9FD: clone (clone.S:130)
==13042== Other segment end (thread 3)
==13042== at 0x45F7D01: ??? (syscall-template.S:82)
==13042==
==13042== Conflicting store by thread 1 at 0x082f5464 size 4
==13042== at 0x80546A3: armcpu_switchMode(armcpu_t*, unsigned char) (armcpu.cpp:330)
==13042== by 0x8071F16: unsigned int OP_MSR_CPSR<0>(unsigned int) (arm_instructions.cpp:3047)
==13042== by 0x805554E: unsigned int armcpu_exec<0>() (armcpu.cpp:682)
==13042== by 0x80FFB94: std::pair<int, int> armInnerLoop<true, true, false>(unsigned long long, int, int, int) (NDSSystem.cpp:1725)
==13042== by 0x81073C4: void NDS_exec<false>(int) (NDSSystem.cpp:1878)
==13042== by 0x80526C4: desmume_cycle(ctrls_event_config*) (main.cpp:482)
==13042== by 0x453DE45: (below main) (libc-start.c:244)
==13042== Location 0x82f5464 is 0 bytes inside NDS_ARM9.R[13],
==13042== a global variable declared at armcpu.cpp:46
==13042== Other segment start (thread 3)
==13042== at 0x40309DA: sem_post@* (drd_pthread_intercepts.c:1059)
==13042== by 0x40AE26E: SDL_SemPost (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x40644B7: ??? (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x40ADD3A: ??? (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x4513C38: start_thread (pthread_create.c:304)
==13042== by 0x45FE9FD: clone (clone.S:130)
==13042== Other segment end (thread 3)
==13042== at 0x45F7D01: ??? (syscall-template.S:82)
==13042== Other segment start (thread 3)
==13042== at 0x40309DA: sem_post@* (drd_pthread_intercepts.c:1059)
==13042== by 0x40AE26E: SDL_SemPost (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x40644B7: ??? (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x40ADD3A: ??? (in /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4)
==13042== by 0x4513C38: start_thread (pthread_create.c:304)
==13042== by 0x45FE9FD: clone (clone.S:130)
==13042== Other segment end (thread 3)
==13042== at 0x45F7D01: ??? (syscall-template.S:82)
DeSmuME didn't enter the jam state under Valgrind, maybe because things are just happening so slowly in its simulated CPU, and the other side of the equation, the GDB client program, was running normally in the real CPU. In the time I waited, the AllocationTest program inside DeSmuME didn't even get far from the initial address. These are the last lines of DeSmuME's console output before I pressed Ctrl-C
...
Break from Emulation
Processing packet g
'g' command PC = 02000020
Processing packet m
Processing packet m
Processing packet m
Processing packet m
Processing packet m
Processing packet m
Processing packet m
Processing packet m
Processing packet m
Processing packet s
Stepping instruction at 02000020
UNSTALL
Step watch: waiting for 02000020 at 02000020
Step hit -> 02000020
STALL
Break from Emulation
Processing packet g
'g' command PC = 02000024
Processing packet m
Processing packet m
Processing packet m
Processing packet m
Processing packet m
Processing packet m
Processing packet m
Processing packet m
Processing packet m
Processing packet m
Processing packet s
Stepping instruction at 02000024
UNSTALL
Step watch: waiting for 02000024 at 02000024
Step hit -> 02000024
STALL
Break from Emulation
Processing packet g
'g' command PC = 02000028
Processing packet m
Processing packet m
Processing packet m
Processing packet m
Processing packet m
Processing packet m
Processing packet m
Processing packet m
Processing packet m
Processing packet m
Processing packet m
Processing packet s
Stepping instruction at 02000028
UNSTALL
Step watch: waiting for 02000028 at 02000028
Step hit -> 02000028
STALL
Break from Emulation
Processing packet g
'g' command PC = 0200002c
Processing packet m
Processing packet m
...
Last edited by xabccode (2015-01-05 21:49:50)
Offline
youre just going to have to dive in and contemplate the thread safety of it.
Offline
As of r5075, GDB stub now works in the optimized Cocoa dev+ build! Enjoy the performance boost.
Offline