Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Added ``posix._emscripten_debugger()`` to help with debugging the test suite on
the Emscripten target.
28 changes: 27 additions & 1 deletion Modules/clinic/posixmodule.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 21 additions & 1 deletion Modules/posixmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@
extern char * _getpty(int *, int, mode_t, int);
#endif

#ifdef __EMSCRIPTEN__
#include "emscripten.h" // emscripten_debugger()
#endif

/*
* A number of APIs are available on macOS from a certain macOS version.
Expand Down Expand Up @@ -16842,8 +16845,24 @@ os__create_environ_impl(PyObject *module)
}


static PyMethodDef posix_methods[] = {
#ifdef __EMSCRIPTEN__
/*[clinic input]
os._emscripten_debugger

Create a breakpoint for the JavaScript debugger. Emscripten only.
[clinic start generated code]*/

static PyObject *
os__emscripten_debugger_impl(PyObject *module)
/*[clinic end generated code: output=ad47dc3bf0661343 input=d814b1877fb6083a]*/
{
emscripten_debugger();
Py_RETURN_NONE;
}
#endif /* __EMSCRIPTEN__ */


static PyMethodDef posix_methods[] = {
OS_STAT_METHODDEF
OS_ACCESS_METHODDEF
OS_TTYNAME_METHODDEF
Expand Down Expand Up @@ -17057,6 +17076,7 @@ static PyMethodDef posix_methods[] = {
OS__INPUTHOOK_METHODDEF
OS__IS_INPUTHOOK_INSTALLED_METHODDEF
OS__CREATE_ENVIRON_METHODDEF
OS__EMSCRIPTEN_DEBUGGER_METHODDEF
{NULL, NULL} /* Sentinel */
};

Expand Down
Loading