From f7e07256283cc080b2720ee6587b96d92ef6f9e5 Mon Sep 17 00:00:00 2001 From: Jim Ingham Date: Mon, 26 Sep 2016 19:47:37 +0000 Subject: Fix serialization of Python breakpoint commands. CommandData breakpoint commands didn't know whether they were Python or Command line commands, so they couldn't serialize & deserialize themselves properly. Fix that. I also changed the "breakpoint list" command to note in the output when the commands are Python commands. Fortunately only one test was relying on this explicit bit of text output. llvm-svn: 282432 --- .../breakpoint/breakpoint_command/TestBreakpointCommand.py | 4 ++-- .../breakpoint/serialize/TestBreakpointSerialization.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'lldb/packages/Python/lldbsuite/test') diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py index bfc1cdf3a79..e67a6332d9d 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py @@ -94,12 +94,12 @@ class BreakpointCommandTestCase(TestBase): substrs=["Breakpoint commands:", "frame variable --show-types --scope"]) self.expect("breakpoint command list 2", "Breakpoint 2 command ok", - substrs=["Breakpoint commands:", + substrs=["Breakpoint commands (Python):", "here = open", "here.write", "here.close()"]) self.expect("breakpoint command list 3", "Breakpoint 3 command ok", - substrs=["Breakpoint commands:", + substrs=["Breakpoint commands (Python):", "bktptcmd.function(frame, bp_loc, internal_dict)"]) self.expect("breakpoint command list 4", "Breakpoint 4 command ok", diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/serialize/TestBreakpointSerialization.py b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/serialize/TestBreakpointSerialization.py index f550063038a..6f93994a466 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/serialize/TestBreakpointSerialization.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/serialize/TestBreakpointSerialization.py @@ -200,7 +200,7 @@ class BreakpointSerialization(TestBase): bkpt.SetQueueName("grubby") bkpt.AddName("FirstName") bkpt.AddName("SecondName") - + bkpt.SetScriptCallbackBody('\tprint("I am a function that prints.")\n\tprint("I don\'t do anything else")\n') source_bps.Append(bkpt) bkpt = self.orig_target.BreakpointCreateBySourceRegex("dont really care", blubby_file_spec) -- cgit v1.2.3