There is longer one available in the review request.(gdb) bt
#0 0xf0d1f020 in ?? ()
#1 0x080adee7 in Scheduler::sync_cpusmp () at snes/scheduler/scheduler.h:30
#2 sCPU::mmio_write (this=0x81c1000, addr=8512, data=0 '\0')
at cpu/scpu/mmio/mmio.cpp:482
Backtrace stopped: frame did not save the PC
(gdb)
bsnes 0.037a segfaults upon rom load (linux i386)
bsnes 0.037a segfaults upon rom load (linux i386)
Hi, this seems to occur only for i386 builds, since x86_64 ones do work fine. ThBacktrace I was able to get seems really short:
Lots of odd things on that page.
First, the zlib patch shouldn't be needed for Linux. It converts filenames to UTF-16 before opening them, but only on Windows. Linux is UTF-8 native.
Second, I don't think ZSNES uses BGR15 internal mode. So you probably won't be able to use the system snes_ntsc library.
I don't get the zeal to make everything a system library, personally. I understand the "we can fix bugs in the libs without updating the main binary" part -- but these are only ~100kb libs, and it's just as likely that future lib updates will retro-actively break the program anyway. But ... if you want those two separate, that's fine by me I guess.
$(strip) is just a function to remove excess whitespace (" _A_ _B_ " -> "A B") from strings. It makes the console compilation output slightly prettier. It strips binaries through the -s flag passed to the linker.
As for your crash, not that I'm upset -- but this is why you shouldn't randomly modify others' makefiles :P
sed -i "s#flags = -O3 -fomit-frame-pointer#flags = %{optflags}#" src/Makefile
Most likely, %{optflags} does not contain -fomit-frame-pointer, which is needed for libco's co_switch() function to work properly. It's a GCC issue (it adds code even to 'naked' functions when the frame pointer is enabled), only other way around that is to go back to assembling libco with yasm.
First, the zlib patch shouldn't be needed for Linux. It converts filenames to UTF-16 before opening them, but only on Windows. Linux is UTF-8 native.
Second, I don't think ZSNES uses BGR15 internal mode. So you probably won't be able to use the system snes_ntsc library.
I don't get the zeal to make everything a system library, personally. I understand the "we can fix bugs in the libs without updating the main binary" part -- but these are only ~100kb libs, and it's just as likely that future lib updates will retro-actively break the program anyway. But ... if you want those two separate, that's fine by me I guess.
$(strip) is just a function to remove excess whitespace (" _A_ _B_ " -> "A B") from strings. It makes the console compilation output slightly prettier. It strips binaries through the -s flag passed to the linker.
As for your crash, not that I'm upset -- but this is why you shouldn't randomly modify others' makefiles :P
sed -i "s#flags = -O3 -fomit-frame-pointer#flags = %{optflags}#" src/Makefile
Most likely, %{optflags} does not contain -fomit-frame-pointer, which is needed for libco's co_switch() function to work properly. It's a GCC issue (it adds code even to 'naked' functions when the frame pointer is enabled), only other way around that is to go back to assembling libco with yasm.
-
- Regular
- Posts: 347
- Joined: Tue Mar 07, 2006 10:32 am
- Location: The Netherlands
Sorry for this somewhat off-topic question, but how do you get naked functions in GCC? Everything I found when I was looking into this a while ago said the compiler tries to determine on its own whether or not to include prolog and epilog code.. which consistently failed when I tried to make assembly-only functions. Does using -fomit-frame-pointer fix this? (I'd still prefer to have MSVC's __declspec(naked) rather than rely on compiler magic, but..)byuu wrote:It's a GCC issue (it adds code even to 'naked' functions when the frame pointer is enabled)
OK, I'll re-add the zlib patch then.byuu wrote:Lots of odd things on that page.
First, the zlib patch shouldn't be needed for Linux. It converts filenames to UTF-16 before opening them, but only on Windows. Linux is UTF-8 native.
Using system snes_ntsc was abandoned.byuu wrote:Second, I don't think ZSNES uses BGR15 internal mode. So you probably won't be able to use the system snes_ntsc library.
I don't get the zeal either, especially when it requires excessive amounts of workbyuu wrote:I don't get the zeal to make everything a system library, personally. I understand the "we can fix bugs in the libs without updating the main binary" part -- but these are only ~100kb libs, and it's just as likely that future lib updates will retro-actively break the program anyway. But ... if you want those two separate, that's fine by me I guess.
![Smile :)](./images/smilies/icon_smile.gif)
Oh, so strip can stay, and to have a working debuginfo I only need to get rid of -s?byuu wrote:$(strip) is just a function to remove excess whitespace (" _A_ _B_ " -> "A B") from strings. It makes the console compilation output slightly prettier. It strips binaries through the -s flag passed to the linker.
OK, I'll keep -fomit-frame-pointer then.byuu wrote:As for your crash, not that I'm upset -- but this is why you shouldn't randomly modify others' makefiles
sed -i "s#flags = -O3 -fomit-frame-pointer#flags = %{optflags}#" src/Makefile
Most likely, %{optflags} does not contain -fomit-frame-pointer, which is needed for libco's co_switch() function to work properly. It's a GCC issue (it adds code even to 'naked' functions when the frame pointer is enabled), only other way around that is to go back to assembling libco with yasm.
There's no __attribute__ for it, sadly. For Linux, you need -fomit-frame-pointer, for OS X I believe you need -static or something like that in addition to. You'd have to check with Lucas or Vas. It ends up having the same effect, and since the code isn't portable anyway ...how do you get naked functions in GCC?
I do wish there were a way I could detect frame pointer mode and at least give a compiler warning.
Yeah, replace -s with -g, IIRC.Oh, so strip can stay, and to have a working debuginfo I only need to get rid of -s?