LLDB
mainline
Toggle main menu visibility
Main Page
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
i
j
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Variables
a
b
d
e
f
g
h
i
k
l
n
p
r
s
t
v
Typedefs
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerations
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
v
w
Enumerator
a
c
d
e
f
g
i
k
l
n
o
p
s
t
u
v
x
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
Related Functions
:
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Variables
_
a
b
c
d
e
g
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Typedefs
_
a
b
c
d
e
f
g
i
j
l
m
o
p
r
s
t
u
v
Enumerations
Enumerator
a
b
d
e
f
g
h
k
l
m
n
p
r
s
v
w
x
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
Examples
llvm-project
lldb
source
Plugins
ScriptInterpreter
Python
lldb-python.h
Go to the documentation of this file.
1
//===-- lldb-python.h -------------------------------------------*- C++ -*-===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
9
#ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_LLDB_PYTHON_H
10
#define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_LLDB_PYTHON_H
11
12
// BEGIN FIXME
13
// This declaration works around a clang module build failure.
14
// It should be deleted ASAP.
15
#include "llvm/Support/Error.h"
16
static
llvm::Expected<bool> *
g_fcxx_modules_workaround
[[maybe_unused]];
17
// END
18
19
#include "lldb/Host/Config.h"
20
21
// Python.h needs to be included before any system headers in order to avoid
22
// redefinition of macros
23
24
#if LLDB_ENABLE_PYTHON
25
#include "llvm/Support/Compiler.h"
26
#if defined(_WIN32)
27
// If anyone #includes Host/PosixApi.h later, it will try to typedef pid_t. We
28
// need to ensure this doesn't happen. At the same time, Python.h will also try
29
// to redefine a bunch of stuff that PosixApi.h defines. So define it all now
30
// so that PosixApi.h doesn't redefine it.
31
#define NO_PID_T
32
#endif
33
#if defined(__linux__)
34
// features.h will define _POSIX_C_SOURCE if _GNU_SOURCE is defined. This value
35
// may be different from the value that Python defines it to be which results
36
// in a warning. Undefine _POSIX_C_SOURCE before including Python.h The same
37
// holds for _XOPEN_SOURCE.
38
#undef _POSIX_C_SOURCE
39
#undef _XOPEN_SOURCE
40
#endif
41
42
// Include locale before Python so _PY_PORT_CTYPE_UTF8_ISSUE doesn't cause
43
// macro redefinitions.
44
#if defined(__APPLE__)
45
#include <locale>
46
#endif
47
48
// Include python for non windows machines
49
#include <Python.h>
50
51
// Provide a meaningful diagnostic error if someone tries to compile this file
52
// with a version of Python we don't support.
53
static_assert
(PY_VERSION_HEX >= 0x03000000,
54
"LLDB requires at least Python 3.0"
);
55
#endif
56
57
#endif
// LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_LLDB_PYTHON_H
g_fcxx_modules_workaround
static llvm::Expected< bool > * g_fcxx_modules_workaround
Definition:
lldb-python.h:16
Generated on Wed Mar 26 2025 12:22:26 for LLDB by
1.9.6