diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2023-07-26 19:03:47 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2023-07-26 19:04:23 +0000 |
| commit | 7fa27ce4a07f19b07799a767fc29416f3b625afb (patch) | |
| tree | 27825c83636c4de341eb09a74f49f5d38a15d165 /lldb/source/Commands/CommandObjectWatchpointCommand.cpp | |
| parent | e3b557809604d036af6e00c60f012c2025b59a5e (diff) | |
Diffstat (limited to 'lldb/source/Commands/CommandObjectWatchpointCommand.cpp')
| -rw-r--r-- | lldb/source/Commands/CommandObjectWatchpointCommand.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lldb/source/Commands/CommandObjectWatchpointCommand.cpp b/lldb/source/Commands/CommandObjectWatchpointCommand.cpp index b33f403a6964..37052ddd62c8 100644 --- a/lldb/source/Commands/CommandObjectWatchpointCommand.cpp +++ b/lldb/source/Commands/CommandObjectWatchpointCommand.cpp @@ -415,17 +415,18 @@ protected: // Special handling for one-liner specified inline. if (m_options.m_use_one_liner) { script_interp->SetWatchpointCommandCallback( - wp_options, m_options.m_one_liner.c_str()); + wp_options, m_options.m_one_liner.c_str(), + /*is_callback=*/false); } // Special handling for using a Python function by name instead of // extending the watchpoint callback data structures, we just // automatize what the user would do manually: make their watchpoint // command be a function call else if (!m_options.m_function_name.empty()) { - std::string oneliner(m_options.m_function_name); - oneliner += "(frame, wp, internal_dict)"; + std::string function_signature = m_options.m_function_name; + function_signature += "(frame, wp, internal_dict)"; script_interp->SetWatchpointCommandCallback( - wp_options, oneliner.c_str()); + wp_options, function_signature.c_str(), /*is_callback=*/true); } else { script_interp->CollectDataForWatchpointCommandCallback(wp_options, result); |
