Skip to content

Commit c8c071c

Browse files
committed
Works 3.11
1 parent 177ed49 commit c8c071c

File tree

3 files changed

+99
-7
lines changed

3 files changed

+99
-7
lines changed

experimental_debug.json

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
{
2+
"runtime_stack": {
3+
"format": "Datadog Runtime Callback 1.0",
4+
"frames": [
5+
{
6+
"function": "string_at",
7+
"file": "/home/bits/.pyenv/versions/3.11.13/lib/python3.11/ctypes/__init__.py",
8+
"line": 519
9+
},
10+
{
11+
"function": "func16",
12+
"file": "tests/internal/crashtracker/test_crashtracker.py",
13+
"line": 679
14+
},
15+
{
16+
"function": "func15",
17+
"file": "tests/internal/crashtracker/test_crashtracker.py",
18+
"line": 676
19+
},
20+
{
21+
"function": "func14",
22+
"file": "tests/internal/crashtracker/test_crashtracker.py",
23+
"line": 673
24+
},
25+
{
26+
"function": "func13",
27+
"file": "tests/internal/crashtracker/test_crashtracker.py",
28+
"line": 670
29+
},
30+
{
31+
"function": "func12",
32+
"file": "tests/internal/crashtracker/test_crashtracker.py",
33+
"line": 667
34+
},
35+
{
36+
"function": "func11",
37+
"file": "tests/internal/crashtracker/test_crashtracker.py",
38+
"line": 664
39+
},
40+
{
41+
"function": "func10",
42+
"file": "tests/internal/crashtracker/test_crashtracker.py",
43+
"line": 661
44+
},
45+
{
46+
"function": "func9",
47+
"file": "tests/internal/crashtracker/test_crashtracker.py",
48+
"line": 658
49+
},
50+
{
51+
"function": "func8",
52+
"file": "tests/internal/crashtracker/test_crashtracker.py",
53+
"line": 655
54+
},
55+
{
56+
"function": "func7",
57+
"file": "tests/internal/crashtracker/test_crashtracker.py",
58+
"line": 652
59+
},
60+
{
61+
"function": "func6",
62+
"file": "tests/internal/crashtracker/test_crashtracker.py",
63+
"line": 649
64+
},
65+
{
66+
"function": "func5",
67+
"file": "tests/internal/crashtracker/test_crashtracker.py",
68+
"line": 646
69+
},
70+
{
71+
"function": "func4",
72+
"file": "tests/internal/crashtracker/test_crashtracker.py",
73+
"line": 643
74+
},
75+
{
76+
"function": "func3",
77+
"file": "tests/internal/crashtracker/test_crashtracker.py",
78+
"line": 640
79+
},
80+
{
81+
"function": "func2",
82+
"file": "tests/internal/crashtracker/test_crashtracker.py",
83+
"line": 637
84+
},
85+
{
86+
"function": "func1",
87+
"file": "tests/internal/crashtracker/test_crashtracker.py",
88+
"line": 634
89+
},
90+
{
91+
"function": "<module>",
92+
"file": "tests/internal/crashtracker/test_crashtracker.py",
93+
"line": 699
94+
}
95+
],
96+
"runtime_type": "unknown"
97+
}
98+
}

src/native/cpython_internal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#define Py_BUILD_CORE 1
66
#include <Python.h>
7-
#include <internal/pycore_traceback.h> // For _Py_DumpTracebackThreads
7+
#include <internal/pycore_traceback.h>
88

99
const char *crashtracker_dump_traceback_threads(int fd,
1010
PyInterpreterState *interp,

src/native/crashtracker.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,15 @@ use datadog_crashtracker::{
1414
use ddcommon::Endpoint;
1515
use pyo3::prelude::*;
1616

17-
// CPython internal API access via C wrapper
18-
// These are wrapper functions defined in cpython_internal.c that properly
19-
// access the internal CPython APIs with Py_BUILD_CORE defined
2017
extern "C" {
21-
// Wrapper for _Py_DumpTracebackThreads - provides access to CPython internal API
2218
fn crashtracker_dump_traceback_threads(
2319
fd: c_int,
2420
interp: *mut pyo3_ffi::PyInterpreterState,
2521
current_tstate: *mut pyo3_ffi::PyThreadState,
2622
) -> *const c_char;
2723

28-
// Wrapper for PyGILState_GetThisThreadState - safe thread state access
2924
fn crashtracker_get_current_tstate() -> *mut pyo3_ffi::PyThreadState;
3025

31-
// System calls for creating memory-based file descriptors
3226
fn pipe(pipefd: *mut [c_int; 2]) -> c_int;
3327
fn read(fd: c_int, buf: *mut c_void, count: usize) -> isize;
3428
fn close(fd: c_int) -> c_int;

0 commit comments

Comments
 (0)