summaryrefslogtreecommitdiff
path: root/lldb/bindings/interface/SBScriptObjectExtensions.i
AgeCommit message (Collapse)Author
2023-08-31Re-land "[lldb/docs] Silence warnings when generating website"Med Ismail Bennani
This patch re-lands f0731d5b61ba with more fixes and improvements. First, this patch removes `__eq__` implementations from classes that didn't implemented `operator!=` on the C++ implementation. This patch removes sphinx document generation for special members such as `__len__`, since there is no straightforward way to skip class that don't implement them. We also don't want to introduce a change in behavior by implementing artifical special members for classes that are missing them. Finally, this patch improve the ergonomics of some classes by implementing special members where it makes sense, i.e. `hex(SBFrame)` is equivalent to `SBFrame.GetPC()`. Differential Revision: https://reviews.llvm.org/D159017 Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
2023-08-31Revert "Re-land "[lldb/docs] Silence warnings when generating website""Med Ismail Bennani
This reverts 3 commit: - f0731d5b61ba798e6d5a63a92d9228010e5a3b50. - 8e0a087571a31057bb98939e3ada73227bed83c7. - f2f5d6fb8d53bc4bd93a3d4e110134ed017b636f. This changes were introduced to silence the warnings that are printed when generating the lldb module documentation for the website but it changed the python bindings and causes test failures on the macos bot: https://green.lab.llvm.org/green/job/lldb-cmake/59438/ We will have to consider other options to silence these warnings.
2023-08-29[lldb] Fix build failures introduced in f0731d5b61ba (NFCI)Med Ismail Bennani
This patch should fix the build failures introduced by f0731d5b61ba. This removes the use of the `STRING_EXTENSION_OUTSIDE` swig macro in SB classes that don't implement a `GetDescription` method. Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
2023-08-29Re-land "[lldb/docs] Silence warnings when generating website"Med Ismail Bennani
This reverts commit 18f1c1ace7a6099f3e8e56cf4b81aa0f64a7dd23 and fix the build failure issues introduced because of the `STRING_EXTENSION_OUTSIDE` swig macros. Differential Revision: https://reviews.llvm.org/D159017 Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
2023-08-29Revert "[lldb/docs] Silence warnings when generating website"Med Ismail Bennani
This reverts commit 498b59e01133bed16c72dd939a9daa8ae1f359e4 since it introduces a build failure: https://lab.llvm.org/buildbot/#/builders/68/builds/58995 Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
2023-08-29[lldb/docs] Silence warnings when generating websiteMed Ismail Bennani
This patch does various things to silence the warnings that show up when generating the website documentation. First, this patch adds the missing definition for special member methods in every SBAPI class. If the class cannot implement one of the special member method, we just define it as a null operation (pass). This should fix the following warnings: ``` WARNING: missing attribute __int__ in object lldb.SB* WARNING: missing attribute __len__ in object lldb.SB* WARNING: missing attribute __hex__ in object lldb.SB* WARNING: missing attribute __oct__ in object lldb.SB* WARNING: missing attribute __iter__ in object lldb.SB* ``` Then, it un-skips the various `static` methods that we didn't generate the methods for, since it's not necessary thanks to the automod-api module. Finally, this comments out the `_static` directory in the sphinx config, since we don't need it anymore. Differential Revision: https://reviews.llvm.org/D159017 Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
2023-07-21[lldb] Convert script native types to StructuredData counterpartMed Ismail Bennani
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>