llvm-capstone/lldb/test/API/python_api
Med Ismail Bennani 57bd882343 [lldb] Convert script native types to StructuredData counterpart
This patch adds the ability to pass native types from the script
interpreter to methods that use a {SB,}StructuredData argument.

To do so, this patch changes the `ScriptedObject` struture that holds
the pointer to the script object as well as the originating script
interpreter language. It also exposes that to the SB API via a new class
called `SBScriptObject`.

This structure allows the debugger to parse the script object and
convert it to a StructuredData object. If the type is not compatible
with the StructuredData types, we will store its pointer in a
`StructuredData::Generic` object.

This patch also adds some SWIG typemaps that checks the input argument to
ensure it's either an SBStructuredData object, in which case it just
passes it throught, or a python object that is NOT another SB type, to
provide some guardrails for the user.

rdar://111467140

Differential Revision: https://reviews.llvm.org/D155161

Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
2023-07-21 18:47:46 -07:00
..
absolute_symbol [NFC][Py Reformat] Reformat python files in lldb 2023-05-25 12:54:09 -07:00
breakpoint [NFC][Py Reformat] Reformat python files in lldb 2023-05-25 12:54:09 -07:00
class_members [NFC][Py Reformat] Reformat python files in lldb 2023-05-25 12:54:09 -07:00
compile_unit [NFC][Py Reformat] Reformat python files in lldb 2023-05-25 12:54:09 -07:00
debugger [NFC][Py Reformat] Reformat python files in lldb 2023-05-25 12:54:09 -07:00
default-constructor [NFC][Py Reformat] Reformat python files in lldb 2023-05-25 12:54:09 -07:00
disassemble-raw-data [NFC][Py Reformat] Reformat python files in lldb 2023-05-25 12:54:09 -07:00
event [NFC][Py Reformat] Reformat python files in lldb 2023-05-25 12:54:09 -07:00
exprpath_synthetic [NFC][Py Reformat] Reformat python files in lldb 2023-05-25 12:54:09 -07:00
file_handle [NFC][Py Reformat] Reformat python files in lldb 2023-05-25 12:54:09 -07:00
findvalue_duplist [NFC][Py Reformat] Reformat python files in lldb 2023-05-25 12:54:09 -07:00
formatters [NFC][Py Reformat] Reformat python files in lldb 2023-05-25 12:54:09 -07:00
frame [NFC][Py Reformat] Reformat python files in lldb 2023-05-25 12:54:09 -07:00
function_symbol [lldb] Fix Python test formatting (NFC) 2023-06-16 14:51:14 -07:00
get-value-32bit-int [NFC][Py Reformat] Reformat python files in lldb 2023-05-25 12:54:09 -07:00
hello_world [NFC][Py Reformat] Reformat python files in lldb 2023-05-25 12:54:09 -07:00
interpreter [NFC][Py Reformat] Reformat python files in lldb 2023-05-25 12:54:09 -07:00
lldbutil [NFC][Py Reformat] Reformat python files in lldb 2023-05-25 12:54:09 -07:00
module_section [NFC][Py Reformat] Reformat python files in lldb 2023-05-25 12:54:09 -07:00
module_spec [lldb][LocateModuleCallback] Update SBFileSpec/SBModuleSpec 2023-07-12 11:11:18 -07:00
name_lookup [NFC][Py Reformat] Reformat python files in lldb 2023-05-25 12:54:09 -07:00
objc_type [NFC][Py Reformat] Reformat python files in lldb 2023-05-25 12:54:09 -07:00
process Fix SBValue::FindValue for file static variables 2023-05-30 17:12:35 -07:00
run_locker [NFC][Py Reformat] Reformat python files in lldb 2023-05-25 12:54:09 -07:00
sbdata [NFC][Py Reformat] Reformat python files in lldb 2023-05-25 12:54:09 -07:00
sbenvironment [NFC][Py Reformat] Reformat python files in lldb 2023-05-25 12:54:09 -07:00
sberror [NFC][Py Reformat] Reformat python files in lldb 2023-05-25 12:54:09 -07:00
sblaunchinfo [NFC][Py Reformat] Reformat python files in lldb 2023-05-25 12:54:09 -07:00
sbmodule [NFC][Py Reformat] Reformat python files in lldb 2023-05-25 12:54:09 -07:00
sbplatform [lldb][Windows] Fix TestLocateModuleCallback 2023-07-14 10:36:57 -07:00
sbstructureddata [lldb] Convert script native types to StructuredData counterpart 2023-07-21 18:47:46 -07:00
sbtype_typeclass [NFC][Py Reformat] Reformat python files in lldb 2023-05-25 12:54:09 -07:00
sbvalue_const_addrof
sbvalue_persist [NFC][Py Reformat] Reformat python files in lldb 2023-05-25 12:54:09 -07:00
sbvalue_unsigned_enum_bitfield_value [NFC][Py Reformat] Reformat python files in lldb 2023-05-25 12:54:09 -07:00
section [NFC][Py Reformat] Reformat python files in lldb 2023-05-25 12:54:09 -07:00
signals [NFC][Py Reformat] Reformat python files in lldb 2023-05-25 12:54:09 -07:00
symbol-context Revert "[LLDB] Add/Remove xfail for some API tests on Windows" 2023-05-29 17:39:36 +04:00
target [lldb] Fix Python test formatting (NFC) 2023-06-16 14:51:14 -07:00
thread [NFC][Py Reformat] Reformat python files in lldb 2023-05-25 12:54:09 -07:00
type [NFC][Py Reformat] Reformat python files in lldb 2023-05-25 12:54:09 -07:00
value Don't allow SBValue::Cast to cast from a smaller type to a larger, 2023-06-26 16:02:01 -07:00
value_var_update [NFC][Py Reformat] Reformat python files in lldb 2023-05-25 12:54:09 -07:00
was_interrupted [NFC][Py Reformat] Reformat python files in lldb 2023-05-25 12:54:09 -07:00
watchpoint [NFC][Py Reformat] Reformat python files in lldb 2023-05-25 12:54:09 -07:00
categories