From 322f12afc3673fc868899857b069ce59084dba05 Mon Sep 17 00:00:00 2001 From: Lawrence D'Anna Date: Mon, 14 Oct 2019 20:15:28 +0000 Subject: remove FILE* usage from ReportEventState() and HandleProcessEvent() Summary: This patch adds FileSP and SBFile versions of the API methods ReportEventState and HandleProcessEvent. It points the SWIG wrappers at these instead of the ones that use FILE* streams. Reviewers: JDevlieghere, jasonmolenda, labath, jingham Reviewed By: labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68546 llvm-svn: 374816 --- .../lldbsuite/test/python_api/default-constructor/sb_debugger.py | 5 ++++- .../lldbsuite/test/python_api/default-constructor/sb_process.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'lldb/packages/Python') diff --git a/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_debugger.py b/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_debugger.py index 16b61091420..e6267c8475e 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_debugger.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_debugger.py @@ -19,7 +19,10 @@ def fuzz_obj(obj): obj.GetCommandInterpreter() obj.HandleCommand("nothing here") listener = obj.GetListener() - obj.HandleProcessEvent(lldb.SBProcess(), lldb.SBEvent(), None, None) + try: + obj.HandleProcessEvent(lldb.SBProcess(), lldb.SBEvent(), None, None) + except Exception: + pass obj.CreateTargetWithFileAndTargetTriple("a.out", "A-B-C") obj.CreateTargetWithFileAndArch("b.out", "arm") obj.CreateTarget("c.out") diff --git a/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_process.py b/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_process.py index eed197a63ef..93e43d4433f 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_process.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_process.py @@ -12,7 +12,10 @@ def fuzz_obj(obj): obj.GetSTDOUT(6) obj.GetSTDERR(6) event = lldb.SBEvent() - obj.ReportEventState(event, None) + try: + obj.ReportEventState(event, None) + except Exception: + pass obj.AppendEventStateReport(event, lldb.SBCommandReturnObject()) error = lldb.SBError() obj.RemoteAttachToProcessWithID(123, error) -- cgit v1.2.3