mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 18:03:56 -04:00
Makepanda now automatically uses gdb to grab the traceback if a child process segfaulted
This commit is contained in:
parent
32ceb7e638
commit
e4c54ae287
@ -216,6 +216,12 @@ def oscmd(cmd, ignoreError = False):
|
|||||||
res = os.spawnl(os.P_WAIT, exe, cmd)
|
res = os.spawnl(os.P_WAIT, exe, cmd)
|
||||||
else:
|
else:
|
||||||
res = os.system(cmd)
|
res = os.system(cmd)
|
||||||
|
if (res == 11):
|
||||||
|
if (LocateBinary("gdb") and GetVerbose()):
|
||||||
|
print GetColor("red") + "Received SIGSEGV, getting traceback..." + GetColor()
|
||||||
|
os.system("gdb -batch -ex 'handle SIG33 pass nostop noprint' -ex 'set pagination 0' -ex 'run' -ex 'bt full' -ex 'info registers' -ex 'thread apply all backtrace' -ex 'quit' --args %s < /dev/null" % cmd)
|
||||||
|
else:
|
||||||
|
print GetColor("red") + "Received SIGSEGV" + GetColor()
|
||||||
if res != 0 and not ignoreError:
|
if res != 0 and not ignoreError:
|
||||||
exit("")
|
exit("")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user