#include "Python.h"
#include "pycore_ast.h"
#include "pycore_call.h"
#include "pycore_fileutils.h"
#include "pycore_frame.h"
#include "pycore_interp.h"
#include "pycore_parser.h"
#include "pycore_pyarena.h"
#include "pycore_pyerrors.h"
#include "pycore_pystate.h"
#include "pycore_sysmodule.h"
#include "pycore_traceback.h"
#include "frameobject.h"
#include "osdefs.h"
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#define OFF(x) …
#define PUTS(fd, str) …
#define MAX_STRING_LENGTH …
#define MAX_FRAME_DEPTH …
#define MAX_NTHREADS …
extern char* _PyTokenizer_FindEncodingFilename(int, PyObject *);
#include "clinic/traceback.c.h"
static PyObject *
tb_create_raw(PyTracebackObject *next, PyFrameObject *frame, int lasti,
int lineno)
{ … }
static PyObject *
tb_new_impl(PyTypeObject *type, PyObject *tb_next, PyFrameObject *tb_frame,
int tb_lasti, int tb_lineno)
{ … }
static PyObject *
tb_dir(PyTracebackObject *self, PyObject *Py_UNUSED(ignored))
{ … }
static PyObject *
tb_next_get(PyTracebackObject *self, void *Py_UNUSED(_))
{ … }
static int
tb_get_lineno(PyTracebackObject* tb) { … }
static PyObject *
tb_lineno_get(PyTracebackObject *self, void *Py_UNUSED(_))
{ … }
static int
tb_next_set(PyTracebackObject *self, PyObject *new_next, void *Py_UNUSED(_))
{ … }
static PyMethodDef tb_methods[] = …;
static PyMemberDef tb_memberlist[] = …;
static PyGetSetDef tb_getsetters[] = …;
static void
tb_dealloc(PyTracebackObject *tb)
{ … }
static int
tb_traverse(PyTracebackObject *tb, visitproc visit, void *arg)
{ … }
static int
tb_clear(PyTracebackObject *tb)
{ … }
PyTypeObject PyTraceBack_Type = …;
PyObject*
_PyTraceBack_FromFrame(PyObject *tb_next, PyFrameObject *frame)
{ … }
int
PyTraceBack_Here(PyFrameObject *frame)
{ … }
void _PyTraceback_Add(const char *funcname, const char *filename, int lineno)
{ … }
static PyObject *
_Py_FindSourceFile(PyObject *filename, char* namebuf, size_t namelen, PyObject *io)
{ … }
int
_Py_WriteIndent(int indent, PyObject *f)
{ … }
static int
display_source_line(PyObject *f, PyObject *filename, int lineno, int indent,
int *truncation, PyObject **line)
{ … }
int
_Py_DisplaySourceLine(PyObject *f, PyObject *filename, int lineno, int indent,
int *truncation, PyObject **line)
{ … }
#define IS_WHITESPACE(c) …
#define _TRACEBACK_SOURCE_LINE_INDENT …
static inline int
ignore_source_errors(void) { … }
static int
tb_displayline(PyTracebackObject* tb, PyObject *f, PyObject *filename, int lineno,
PyFrameObject *frame, PyObject *name)
{ … }
static const int TB_RECURSIVE_CUTOFF = …;
static int
tb_print_line_repeated(PyObject *f, long cnt)
{ … }
static int
tb_printinternal(PyTracebackObject *tb, PyObject *f, long limit)
{ … }
#define PyTraceBack_LIMIT …
int
_PyTraceBack_Print(PyObject *v, const char *header, PyObject *f)
{ … }
int
PyTraceBack_Print(PyObject *v, PyObject *f)
{ … }
void
_Py_DumpDecimal(int fd, size_t value)
{ … }
void
_Py_DumpHexadecimal(int fd, uintptr_t value, Py_ssize_t width)
{ … }
void
_Py_DumpASCII(int fd, PyObject *text)
{ … }
static void
dump_frame(int fd, _PyInterpreterFrame *frame)
{ … }
static int
tstate_is_freed(PyThreadState *tstate)
{ … }
static int
interp_is_freed(PyInterpreterState *interp)
{ … }
static void
dump_traceback(int fd, PyThreadState *tstate, int write_header)
{ … }
void
_Py_DumpTraceback(int fd, PyThreadState *tstate)
{ … }
static void
write_thread_id(int fd, PyThreadState *tstate, int is_current)
{ … }
const char*
_Py_DumpTracebackThreads(int fd, PyInterpreterState *interp,
PyThreadState *current_tstate)
{ … }