Skip to content

Commit bb07f97

Browse files
committed
[lldb/bindings] Update SWIG static bindings (NFC)
Signed-off-by: Med Ismail Bennani <[email protected]>
1 parent f06864b commit bb07f97

File tree

2 files changed

+213
-0
lines changed

2 files changed

+213
-0
lines changed

lldb/bindings/python/static-binding/LLDBWrapPython.cpp

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20974,6 +20974,133 @@ SWIGINTERN PyObject *SBData_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *a
2097420974
return SWIG_Python_InitShadowInstance(args);
2097520975
}
2097620976

20977+
SWIGINTERN PyObject *_wrap_SBDebugger_GetProgressFromEvent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20978+
PyObject *resultobj = 0;
20979+
lldb::SBEvent *arg1 = 0 ;
20980+
uint64_t *arg2 = 0 ;
20981+
uint64_t *arg3 = 0 ;
20982+
uint64_t *arg4 = 0 ;
20983+
bool *arg5 = 0 ;
20984+
void *argp1 = 0 ;
20985+
int res1 = 0 ;
20986+
uint64_t temp2 ;
20987+
int res2 = SWIG_TMPOBJ ;
20988+
uint64_t temp3 ;
20989+
int res3 = SWIG_TMPOBJ ;
20990+
uint64_t temp4 ;
20991+
int res4 = SWIG_TMPOBJ ;
20992+
bool temp5 ;
20993+
int res5 = SWIG_TMPOBJ ;
20994+
PyObject *swig_obj[1] ;
20995+
char *result = 0 ;
20996+
20997+
arg2 = &temp2;
20998+
arg3 = &temp3;
20999+
arg4 = &temp4;
21000+
arg5 = &temp5;
21001+
if (!args) SWIG_fail;
21002+
swig_obj[0] = args;
21003+
res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_lldb__SBEvent, 0 | 0);
21004+
if (!SWIG_IsOK(res1)) {
21005+
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SBDebugger_GetProgressFromEvent" "', argument " "1"" of type '" "lldb::SBEvent const &""'");
21006+
}
21007+
if (!argp1) {
21008+
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SBDebugger_GetProgressFromEvent" "', argument " "1"" of type '" "lldb::SBEvent const &""'");
21009+
}
21010+
arg1 = reinterpret_cast< lldb::SBEvent * >(argp1);
21011+
{
21012+
SWIG_PYTHON_THREAD_BEGIN_ALLOW;
21013+
result = (char *)lldb::SBDebugger::GetProgressFromEvent((lldb::SBEvent const &)*arg1,*arg2,*arg3,*arg4,*arg5);
21014+
SWIG_PYTHON_THREAD_END_ALLOW;
21015+
}
21016+
resultobj = SWIG_FromCharPtr((const char *)result);
21017+
if (SWIG_IsTmpObj(res2)) {
21018+
resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_unsigned_SS_long_SS_long((*arg2)));
21019+
} else {
21020+
int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
21021+
resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_unsigned_long_long, new_flags));
21022+
}
21023+
if (SWIG_IsTmpObj(res3)) {
21024+
resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_unsigned_SS_long_SS_long((*arg3)));
21025+
} else {
21026+
int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
21027+
resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_unsigned_long_long, new_flags));
21028+
}
21029+
if (SWIG_IsTmpObj(res4)) {
21030+
resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_unsigned_SS_long_SS_long((*arg4)));
21031+
} else {
21032+
int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
21033+
resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_unsigned_long_long, new_flags));
21034+
}
21035+
if (SWIG_IsTmpObj(res5)) {
21036+
resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_bool((*arg5)));
21037+
} else {
21038+
int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
21039+
resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_bool, new_flags));
21040+
}
21041+
return resultobj;
21042+
fail:
21043+
return NULL;
21044+
}
21045+
21046+
21047+
SWIGINTERN PyObject *_wrap_SBDebugger_GetDiagnosticFromEvent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21048+
PyObject *resultobj = 0;
21049+
lldb::SBEvent *arg1 = 0 ;
21050+
void *argp1 = 0 ;
21051+
int res1 = 0 ;
21052+
PyObject *swig_obj[1] ;
21053+
lldb::SBStructuredData result;
21054+
21055+
if (!args) SWIG_fail;
21056+
swig_obj[0] = args;
21057+
res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_lldb__SBEvent, 0 | 0);
21058+
if (!SWIG_IsOK(res1)) {
21059+
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SBDebugger_GetDiagnosticFromEvent" "', argument " "1"" of type '" "lldb::SBEvent const &""'");
21060+
}
21061+
if (!argp1) {
21062+
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SBDebugger_GetDiagnosticFromEvent" "', argument " "1"" of type '" "lldb::SBEvent const &""'");
21063+
}
21064+
arg1 = reinterpret_cast< lldb::SBEvent * >(argp1);
21065+
{
21066+
SWIG_PYTHON_THREAD_BEGIN_ALLOW;
21067+
result = lldb::SBDebugger::GetDiagnosticFromEvent((lldb::SBEvent const &)*arg1);
21068+
SWIG_PYTHON_THREAD_END_ALLOW;
21069+
}
21070+
resultobj = SWIG_NewPointerObj((new lldb::SBStructuredData(static_cast< const lldb::SBStructuredData& >(result))), SWIGTYPE_p_lldb__SBStructuredData, SWIG_POINTER_OWN | 0 );
21071+
return resultobj;
21072+
fail:
21073+
return NULL;
21074+
}
21075+
21076+
21077+
SWIGINTERN PyObject *_wrap_SBDebugger_GetBroadcaster(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21078+
PyObject *resultobj = 0;
21079+
lldb::SBDebugger *arg1 = (lldb::SBDebugger *) 0 ;
21080+
void *argp1 = 0 ;
21081+
int res1 = 0 ;
21082+
PyObject *swig_obj[1] ;
21083+
lldb::SBBroadcaster result;
21084+
21085+
if (!args) SWIG_fail;
21086+
swig_obj[0] = args;
21087+
res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_lldb__SBDebugger, 0 | 0 );
21088+
if (!SWIG_IsOK(res1)) {
21089+
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SBDebugger_GetBroadcaster" "', argument " "1"" of type '" "lldb::SBDebugger *""'");
21090+
}
21091+
arg1 = reinterpret_cast< lldb::SBDebugger * >(argp1);
21092+
{
21093+
SWIG_PYTHON_THREAD_BEGIN_ALLOW;
21094+
result = (arg1)->GetBroadcaster();
21095+
SWIG_PYTHON_THREAD_END_ALLOW;
21096+
}
21097+
resultobj = SWIG_NewPointerObj((new lldb::SBBroadcaster(static_cast< const lldb::SBBroadcaster& >(result))), SWIGTYPE_p_lldb__SBBroadcaster, SWIG_POINTER_OWN | 0 );
21098+
return resultobj;
21099+
fail:
21100+
return NULL;
21101+
}
21102+
21103+
2097721104
SWIGINTERN PyObject *_wrap_SBDebugger_Initialize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
2097821105
PyObject *resultobj = 0;
2097921106

@@ -68306,6 +68433,33 @@ SWIGINTERN PyObject *_wrap_SBType_IsScopedEnumerationType(PyObject *SWIGUNUSEDPA
6830668433
}
6830768434

6830868435

68436+
SWIGINTERN PyObject *_wrap_SBType_IsAggregateType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68437+
PyObject *resultobj = 0;
68438+
lldb::SBType *arg1 = (lldb::SBType *) 0 ;
68439+
void *argp1 = 0 ;
68440+
int res1 = 0 ;
68441+
PyObject *swig_obj[1] ;
68442+
bool result;
68443+
68444+
if (!args) SWIG_fail;
68445+
swig_obj[0] = args;
68446+
res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_lldb__SBType, 0 | 0 );
68447+
if (!SWIG_IsOK(res1)) {
68448+
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SBType_IsAggregateType" "', argument " "1"" of type '" "lldb::SBType *""'");
68449+
}
68450+
arg1 = reinterpret_cast< lldb::SBType * >(argp1);
68451+
{
68452+
SWIG_PYTHON_THREAD_BEGIN_ALLOW;
68453+
result = (bool)(arg1)->IsAggregateType();
68454+
SWIG_PYTHON_THREAD_END_ALLOW;
68455+
}
68456+
resultobj = SWIG_From_bool(static_cast< bool >(result));
68457+
return resultobj;
68458+
fail:
68459+
return NULL;
68460+
}
68461+
68462+
6830968463
SWIGINTERN PyObject *_wrap_SBType_GetPointerType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6831068464
PyObject *resultobj = 0;
6831168465
lldb::SBType *arg1 = (lldb::SBType *) 0 ;
@@ -82116,6 +82270,9 @@ static PyMethodDef SwigMethods[] = {
8211682270
{ "SBData___str__", _wrap_SBData___str__, METH_O, "SBData___str__(SBData self) -> std::string"},
8211782271
{ "SBData_swigregister", SBData_swigregister, METH_O, NULL},
8211882272
{ "SBData_swiginit", SBData_swiginit, METH_VARARGS, NULL},
82273+
{ "SBDebugger_GetProgressFromEvent", _wrap_SBDebugger_GetProgressFromEvent, METH_O, "SBDebugger_GetProgressFromEvent(SBEvent event) -> char const *"},
82274+
{ "SBDebugger_GetDiagnosticFromEvent", _wrap_SBDebugger_GetDiagnosticFromEvent, METH_O, "SBDebugger_GetDiagnosticFromEvent(SBEvent event) -> SBStructuredData"},
82275+
{ "SBDebugger_GetBroadcaster", _wrap_SBDebugger_GetBroadcaster, METH_O, "SBDebugger_GetBroadcaster(SBDebugger self) -> SBBroadcaster"},
8211982276
{ "SBDebugger_Initialize", _wrap_SBDebugger_Initialize, METH_NOARGS, "SBDebugger_Initialize()"},
8212082277
{ "SBDebugger_InitializeWithErrorHandling", _wrap_SBDebugger_InitializeWithErrorHandling, METH_NOARGS, "SBDebugger_InitializeWithErrorHandling() -> SBError"},
8212182278
{ "SBDebugger_Terminate", _wrap_SBDebugger_Terminate, METH_NOARGS, "SBDebugger_Terminate()"},
@@ -84936,6 +85093,17 @@ static PyMethodDef SwigMethods[] = {
8493685093
" * Objective-C: Returns false for all types.\n"
8493785094
"\n"
8493885095
""},
85096+
{ "SBType_IsAggregateType", _wrap_SBType_IsAggregateType, METH_O, "\n"
85097+
"SBType_IsAggregateType(SBType self) -> bool\n"
85098+
"Returns true if this type is an aggregate type.\n"
85099+
"\n"
85100+
" Language-specific behaviour:\n"
85101+
"\n"
85102+
" * C: Returns true for struct values, arrays, and vectors.\n"
85103+
" * C++: Same a C. Also includes class instances.\n"
85104+
" * Objective-C: Same as C. Also includes class instances.\n"
85105+
"\n"
85106+
""},
8493985107
{ "SBType_GetPointerType", _wrap_SBType_GetPointerType, METH_O, "\n"
8494085108
"SBType_GetPointerType(SBType self) -> SBType\n"
8494185109
"Returns a type that represents a pointer to this type.\n"
@@ -88390,6 +88558,9 @@ SWIG_init(void) {
8839088558
SWIG_Python_SetConstant(d, "SBCommunication_eBroadcastBitReadThreadShouldExit",SWIG_From_int(static_cast< int >(lldb::SBCommunication::eBroadcastBitReadThreadShouldExit)));
8839188559
SWIG_Python_SetConstant(d, "SBCommunication_eBroadcastBitPacketAvailable",SWIG_From_int(static_cast< int >(lldb::SBCommunication::eBroadcastBitPacketAvailable)));
8839288560
SWIG_Python_SetConstant(d, "SBCommunication_eAllEventBits",SWIG_From_int(static_cast< int >(lldb::SBCommunication::eAllEventBits)));
88561+
SWIG_Python_SetConstant(d, "SBDebugger_eBroadcastBitProgress",SWIG_From_int(static_cast< int >(lldb::SBDebugger::eBroadcastBitProgress)));
88562+
SWIG_Python_SetConstant(d, "SBDebugger_eBroadcastBitWarning",SWIG_From_int(static_cast< int >(lldb::SBDebugger::eBroadcastBitWarning)));
88563+
SWIG_Python_SetConstant(d, "SBDebugger_eBroadcastBitError",SWIG_From_int(static_cast< int >(lldb::SBDebugger::eBroadcastBitError)));
8839388564
SWIG_Python_SetConstant(d, "SBProcess_eBroadcastBitStateChanged",SWIG_From_int(static_cast< int >(lldb::SBProcess::eBroadcastBitStateChanged)));
8839488565
SWIG_Python_SetConstant(d, "SBProcess_eBroadcastBitInterrupt",SWIG_From_int(static_cast< int >(lldb::SBProcess::eBroadcastBitInterrupt)));
8839588566
SWIG_Python_SetConstant(d, "SBProcess_eBroadcastBitSTDOUT",SWIG_From_int(static_cast< int >(lldb::SBProcess::eBroadcastBitSTDOUT)));

lldb/bindings/python/static-binding/lldb.py

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4159,6 +4159,26 @@ def disassemble_instructions (insts):
41594159

41604160
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
41614161
__repr__ = _swig_repr
4162+
eBroadcastBitProgress = _lldb.SBDebugger_eBroadcastBitProgress
4163+
4164+
eBroadcastBitWarning = _lldb.SBDebugger_eBroadcastBitWarning
4165+
4166+
eBroadcastBitError = _lldb.SBDebugger_eBroadcastBitError
4167+
4168+
4169+
@staticmethod
4170+
def GetProgressFromEvent(event):
4171+
r"""GetProgressFromEvent(SBEvent event) -> char const *"""
4172+
return _lldb.SBDebugger_GetProgressFromEvent(event)
4173+
4174+
@staticmethod
4175+
def GetDiagnosticFromEvent(event):
4176+
r"""GetDiagnosticFromEvent(SBEvent event) -> SBStructuredData"""
4177+
return _lldb.SBDebugger_GetDiagnosticFromEvent(event)
4178+
4179+
def GetBroadcaster(self):
4180+
r"""GetBroadcaster(SBDebugger self) -> SBBroadcaster"""
4181+
return _lldb.SBDebugger_GetBroadcaster(self)
41624182

41634183
@staticmethod
41644184
def Initialize():
@@ -4661,6 +4681,14 @@ def __len__(self):
46614681
# Register SBDebugger in _lldb:
46624682
_lldb.SBDebugger_swigregister(SBDebugger)
46634683

4684+
def SBDebugger_GetProgressFromEvent(event):
4685+
r"""SBDebugger_GetProgressFromEvent(SBEvent event) -> char const *"""
4686+
return _lldb.SBDebugger_GetProgressFromEvent(event)
4687+
4688+
def SBDebugger_GetDiagnosticFromEvent(event):
4689+
r"""SBDebugger_GetDiagnosticFromEvent(SBEvent event) -> SBStructuredData"""
4690+
return _lldb.SBDebugger_GetDiagnosticFromEvent(event)
4691+
46644692
def SBDebugger_Initialize():
46654693
r"""SBDebugger_Initialize()"""
46664694
return _lldb.SBDebugger_Initialize()
@@ -12337,6 +12365,20 @@ def IsScopedEnumerationType(self):
1233712365
"""
1233812366
return _lldb.SBType_IsScopedEnumerationType(self)
1233912367

12368+
def IsAggregateType(self):
12369+
r"""
12370+
IsAggregateType(SBType self) -> bool
12371+
Returns true if this type is an aggregate type.
12372+
12373+
Language-specific behaviour:
12374+
12375+
* C: Returns true for struct values, arrays, and vectors.
12376+
* C++: Same a C. Also includes class instances.
12377+
* Objective-C: Same as C. Also includes class instances.
12378+
12379+
"""
12380+
return _lldb.SBType_IsAggregateType(self)
12381+
1234012382
def GetPointerType(self):
1234112383
r"""
1234212384
GetPointerType(SBType self) -> SBType

0 commit comments

Comments
 (0)