Python: include Python stack trace in the crash log

This helps Python developers troubleshoot errors when
Python causes a crash.
This commit is contained in:
Daniel Bailey
2020-08-06 15:34:55 +10:00
committed by Campbell Barton
parent c5b6b3d82f
commit e9c4325515
5 changed files with 31 additions and 0 deletions

View File

@@ -436,6 +436,12 @@ static void python_script_error_jump_text(struct Text *text)
}
}
void BPY_python_backtrace(FILE *fp)
{
fputs("\n# Python backtrace\n", fp);
PyC_StackPrint(fp);
}
/* super annoying, undo _PyModule_Clear(), bug [#23871] */
#define PYMODULE_CLEAR_WORKAROUND