2011-07-19 05:30:21 +08:00
|
|
|
//===-- SWIG Interface for SBBreakpointLocation -----------------*- C++ -*-===//
|
|
|
|
//
|
2019-01-19 16:50:56 +08:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2011-07-19 05:30:21 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
namespace lldb {
|
|
|
|
|
|
|
|
%feature("docstring",
|
|
|
|
"Represents one unique instance (by address) of a logical breakpoint.
|
|
|
|
|
|
|
|
A breakpoint location is defined by the breakpoint that produces it,
|
|
|
|
and the address that resulted in this particular instantiation.
|
|
|
|
Each breakpoint location has its settable options.
|
|
|
|
|
|
|
|
SBBreakpoint contains SBBreakpointLocation(s). See docstring of SBBreakpoint
|
|
|
|
for retrieval of an SBBreakpointLocation from an SBBreakpoint."
|
|
|
|
) SBBreakpointLocation;
|
|
|
|
class SBBreakpointLocation
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
SBBreakpointLocation ();
|
|
|
|
|
|
|
|
SBBreakpointLocation (const lldb::SBBreakpointLocation &rhs);
|
|
|
|
|
|
|
|
~SBBreakpointLocation ();
|
|
|
|
|
2012-05-17 01:15:08 +08:00
|
|
|
break_id_t
|
|
|
|
GetID ();
|
2019-04-19 00:23:33 +08:00
|
|
|
|
2011-07-19 05:30:21 +08:00
|
|
|
bool
|
|
|
|
IsValid() const;
|
|
|
|
|
Add "operator bool" to SB APIs
Summary:
Our python version of the SB API has (the python equivalent of)
operator bool, but the C++ version doesn't.
This is because our python operators are added by modify-python-lldb.py,
which performs postprocessing on the swig-generated interface files.
In this patch, I add the "operator bool" to all SB classes which have an
IsValid method (which is the same logic used by modify-python-lldb.py).
This way, we make the two interfaces more constent, and it allows us to
rely on swig's automatic syntesis of python __nonzero__ methods instead
of doing manual fixups.
Reviewers: zturner, jingham, clayborg, jfb, serge-sans-paille
Subscribers: jdoerfert, lldb-commits
Differential Revision: https://reviews.llvm.org/D58792
llvm-svn: 355824
2019-03-11 21:58:46 +08:00
|
|
|
explicit operator bool() const;
|
|
|
|
|
2011-10-08 06:27:25 +08:00
|
|
|
lldb::SBAddress
|
|
|
|
GetAddress();
|
2019-04-19 00:23:33 +08:00
|
|
|
|
2011-07-19 05:30:21 +08:00
|
|
|
lldb::addr_t
|
|
|
|
GetLoadAddress ();
|
|
|
|
|
|
|
|
void
|
|
|
|
SetEnabled(bool enabled);
|
|
|
|
|
|
|
|
bool
|
|
|
|
IsEnabled ();
|
|
|
|
|
2017-07-19 22:31:19 +08:00
|
|
|
uint32_t
|
|
|
|
GetHitCount ();
|
|
|
|
|
2011-07-19 05:30:21 +08:00
|
|
|
uint32_t
|
|
|
|
GetIgnoreCount ();
|
|
|
|
|
|
|
|
void
|
|
|
|
SetIgnoreCount (uint32_t n);
|
|
|
|
|
2011-10-19 03:13:06 +08:00
|
|
|
%feature("docstring", "
|
2019-04-19 00:23:33 +08:00
|
|
|
The breakpoint location stops only if the condition expression evaluates
|
|
|
|
to true.") SetCondition;
|
|
|
|
void
|
2011-07-19 05:30:21 +08:00
|
|
|
SetCondition (const char *condition);
|
2019-04-19 00:23:33 +08:00
|
|
|
|
2011-10-19 03:13:06 +08:00
|
|
|
%feature("docstring", "
|
2019-04-19 00:23:33 +08:00
|
|
|
Get the condition expression for the breakpoint location.") GetCondition;
|
2011-07-19 05:30:21 +08:00
|
|
|
const char *
|
|
|
|
GetCondition ();
|
|
|
|
|
2017-08-04 02:13:24 +08:00
|
|
|
bool GetAutoContinue();
|
2019-04-19 00:23:33 +08:00
|
|
|
|
2017-08-04 02:13:24 +08:00
|
|
|
void SetAutoContinue(bool auto_continue);
|
|
|
|
|
2014-04-02 09:04:55 +08:00
|
|
|
%feature("docstring", "
|
2019-04-19 00:23:33 +08:00
|
|
|
Set the callback to the given Python function name.") SetScriptCallbackFunction;
|
2014-04-02 09:04:55 +08:00
|
|
|
void
|
|
|
|
SetScriptCallbackFunction (const char *callback_function_name);
|
|
|
|
|
|
|
|
%feature("docstring", "
|
2019-04-19 00:23:33 +08:00
|
|
|
Provide the body for the script function to be called when the breakpoint location is hit.
|
|
|
|
The body will be wrapped in a function, which be passed two arguments:
|
|
|
|
'frame' - which holds the bottom-most SBFrame of the thread that hit the breakpoint
|
|
|
|
'bpno' - which is the SBBreakpointLocation to which the callback was attached.
|
|
|
|
|
|
|
|
The error parameter is currently ignored, but will at some point hold the Python
|
|
|
|
compilation diagnostics.
|
|
|
|
Returns true if the body compiles successfully, false if not.") SetScriptCallbackBody;
|
2014-04-02 09:04:55 +08:00
|
|
|
SBError
|
|
|
|
SetScriptCallbackBody (const char *script_body_text);
|
2019-04-19 00:23:33 +08:00
|
|
|
|
2017-08-02 08:16:10 +08:00
|
|
|
void SetCommandLineCommands(SBStringList &commands);
|
|
|
|
|
|
|
|
bool GetCommandLineCommands(SBStringList &commands);
|
|
|
|
|
2011-07-19 05:30:21 +08:00
|
|
|
void
|
|
|
|
SetThreadID (lldb::tid_t sb_thread_id);
|
|
|
|
|
|
|
|
lldb::tid_t
|
|
|
|
GetThreadID ();
|
2019-04-19 00:23:33 +08:00
|
|
|
|
2011-07-19 05:30:21 +08:00
|
|
|
void
|
|
|
|
SetThreadIndex (uint32_t index);
|
2019-04-19 00:23:33 +08:00
|
|
|
|
2011-07-19 05:30:21 +08:00
|
|
|
uint32_t
|
|
|
|
GetThreadIndex() const;
|
2019-04-19 00:23:33 +08:00
|
|
|
|
2011-07-19 05:30:21 +08:00
|
|
|
void
|
|
|
|
SetThreadName (const char *thread_name);
|
2019-04-19 00:23:33 +08:00
|
|
|
|
2011-07-19 05:30:21 +08:00
|
|
|
const char *
|
|
|
|
GetThreadName () const;
|
2019-04-19 00:23:33 +08:00
|
|
|
|
|
|
|
void
|
2011-07-19 05:30:21 +08:00
|
|
|
SetQueueName (const char *queue_name);
|
2019-04-19 00:23:33 +08:00
|
|
|
|
2011-07-19 05:30:21 +08:00
|
|
|
const char *
|
|
|
|
GetQueueName () const;
|
|
|
|
|
|
|
|
bool
|
|
|
|
IsResolved ();
|
|
|
|
|
|
|
|
bool
|
|
|
|
GetDescription (lldb::SBStream &description, DescriptionLevel level);
|
|
|
|
|
|
|
|
SBBreakpoint
|
|
|
|
GetBreakpoint ();
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace lldb
|