From e7a9115680e22fac3dc996800deaec773becfac0 Mon Sep 17 00:00:00 2001 From: Lawrence D'Anna Date: Mon, 14 Oct 2019 20:59:57 +0000 Subject: remove FILE* bindings from SBInstruction. Summary: This patch replaces the FILE* python bindings for SBInstruction and SBInstructionList and replaces them with the new, safe SBFile and FileSP bindings. I also re-enable `Test_Disassemble_VST1_64`, because now we can use the file bindings as an additional test of the disassembler, and we can use the disassembler test as a test of the file bindings. The bugs referred to in the comments appear to have been fixed. The radar is closed now and the bugzilla bug does not reproduce with the instructions given. Reviewers: JDevlieghere, jasonmolenda, labath Reviewed By: labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68890 llvm-svn: 374820 --- .../lldbsuite/test/python_api/default-constructor/sb_instruction.py | 5 ++++- .../test/python_api/default-constructor/sb_instructionlist.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'lldb/packages/Python/lldbsuite/test/python_api/default-constructor') diff --git a/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_instruction.py b/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_instruction.py index aca1d8a02b3..fbfb2313688 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_instruction.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_instruction.py @@ -9,7 +9,10 @@ def fuzz_obj(obj): obj.GetAddress() obj.GetByteSize() obj.DoesBranch() - obj.Print(None) + try: + obj.Print(None) + except Exception: + pass obj.GetDescription(lldb.SBStream()) obj.EmulateWithFrame(lldb.SBFrame(), 0) obj.DumpEmulation("armv7") diff --git a/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_instructionlist.py b/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_instructionlist.py index 88fbc065c55..9e7ebf927f4 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_instructionlist.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_instructionlist.py @@ -9,7 +9,10 @@ def fuzz_obj(obj): obj.GetSize() obj.GetInstructionAtIndex(0xffffffff) obj.AppendInstruction(lldb.SBInstruction()) - obj.Print(None) + try: + obj.Print(None) + except Exception: + pass obj.GetDescription(lldb.SBStream()) obj.DumpEmulationForAllInstructions("armv7") obj.Clear() -- cgit v1.2.3