Skip to content
This repository has been archived by the owner on Jul 10, 2023. It is now read-only.

Segfault if you try to run with gdb #865

Closed
sergiobenrocha2 opened this issue Nov 13, 2015 · 2 comments
Closed

Segfault if you try to run with gdb #865

sergiobenrocha2 opened this issue Nov 13, 2015 · 2 comments

Comments

@sergiobenrocha2
Copy link
Contributor

sergiobenrocha2 commented Nov 13, 2015

I can't debug another issue because reicast is segfauting if I try to use gdb.

Program received signal SIGSEGV, Segmentation fault.
bm_GetCode (addr=<optimized out>) at ../../core/hw/sh4/dyna/blockmanager.cpp:97
97      return (DynarecCodeEntryPtr)rv;
(gdb) bt full
#0  bm_GetCode (addr=<optimized out>) at ../../core/hw/sh4/dyna/blockmanager.cpp:97
No locals.
#1  0x0000000000aa7353 in ngen_mainloop (v_cntx=0x7fffd1da0000) at ../../core/rec-x64/rec_x64.cpp:50
        rcb = <optimized out>
        ctx = 0x7fffcdca0000
#2  0x000000000049f7c8 in recSh4_Run () at ../../core/hw/sh4/dyna/driver.cpp:91
        __FUNCTION__ = "recSh4_Run"
#3  0x00000000004088cd in main (argc=1, argv=0x7fffffffdf78) at ../../core/linux-dist/main.cpp:443
        dirs = std::vector of length 5, capacity 5 = {"/usr/share/xubuntu/reicast", "/usr/share/xfce4/reicast", "/usr/local/share//reicast", "/usr/share//reicast", "/usr/share/reicast"}

backtrace with Dynarec.Enabled = 1, you can't even see dreamcast bios boot.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@sergiobenrocha2
Copy link
Contributor Author

With the interpreter, no game loaded:

Program received signal SIGSEGV, Segmentation fault.
pvr_write_area1_32 (addr=<optimized out>, data=0) at ../../core/hw/pvr/pvr_mem.cpp:216
216     *(u32*)&vram[pvr_map32(addr) & VRAM_MASK] = data;
(gdb) bt full
#0  pvr_write_area1_32 (addr=<optimized out>, data=0) at ../../core/hw/pvr/pvr_mem.cpp:216
No locals.
#1  0x000000000047c20b in Sh4_int_Run () at ../../core/hw/sh4/interpr/sh4_interpreter.cpp:56
        addr = <optimized out>
        op = <optimized out>
        l = 56
#2  0x00000000004088cd in main (argc=1, argv=0x7fffffffdf78) at ../../core/linux-dist/main.cpp:443
        dirs = std::vector of length 5, capacity 5 = {"/usr/share/xubuntu/reicast", "/usr/share/xfce4/reicast", "/usr/local/share//reicast", "/usr/share//reicast", "/usr/share/reicast"}

@skmp
Copy link
Owner

skmp commented Jul 15, 2018

This is normal behavior - we use segfaults for optimizations. See #1102. Also, this kind of 'getting started' discussion could also be done in http://forum.reicast.com to avoid overloading the tracker :)

@skmp skmp closed this as completed Jul 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants