Code: Select all
GNU gdb 6.4
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "--host=i686-pc-cygwin --target=psp"...
(gdb) target remote :10001
Remote debugging using :10001
[New thread 0]
_start (args=0, argp=0x0) at crt0.c:105
105 if ((&module_info != NULL) && (module_info.modattribute & 0x1000)) {
(gdb) c
Continuing.
[New thread 13506353]
Program received signal SIGBUS, Bus error.
[Switching to thread 13506353]
SDL_LowerBlit (src=0x8ad0780, srcrect=0x88f7cb0, dst=0x8ab4450, dstrect=0x88f7ca8) at SDL_surface.c:424
424 if ( (src->map->dst != dst) ||
(gdb) disas
Dump of assembler code for function SDL_LowerBlit:
0x089f47a8 <SDL_LowerBlit+0>: addiu sp,sp,-40
0x089f47ac <SDL_LowerBlit+4>: sw s3,28(sp)
0x089f47b0 <SDL_LowerBlit+8>: sw s2,24(sp)
0x089f47b4 <SDL_LowerBlit+12>: sw s1,20(sp)
0x089f47b8 <SDL_LowerBlit+16>: sw s0,16(sp)
0x089f47bc <SDL_LowerBlit+20>: sw ra,32(sp)
0x089f47c0 <SDL_LowerBlit+24>: lw t0,48(a0)
0x089f47c4 <SDL_LowerBlit+28>: move s3,a0
0x089f47c8 <SDL_LowerBlit+32>: move s2,a2
0x089f47cc <SDL_LowerBlit+36>: lw v0,0(t0)
0x089f47d0 <SDL_LowerBlit+40>: move s0,a1
0x089f47d4 <SDL_LowerBlit+44>: bne v0,a2,0x89f47ec <SDL_LowerBlit+68>
0x089f47d8 <SDL_LowerBlit+48>: move s1,a3
<omitted>
(gdb) p/x $pc
$1 = 0x89f47cc
(gdb) p/x $t0
$2 = 0x0
(gdb) p/x $a0
$3 = 0x8ad0780
(gdb) p/x *(int *)($a0+48)
$4 = 0x8b7e530
(gdb) set $t0=*(int *)($a0+48)
(gdb) p/x $t0
$5 = 0x8b7e530
(gdb) c
Continuing.
Can't send signals to this remote system. SIGBUS not sent.
This error happens randomly, I call SDL_LowerBlit many times, and only in some rare cases this hasppens.
EDIT:
I am a fucking idiot and another thread deleted the surface, that's why I had SIGBUS, and then this thread allocated surface again and that's why everything worked in debugger.
Thank you for reading.