summaryrefslogtreecommitdiffstats
path: root/lldb/include/lldb/Breakpoint/BreakpointLocation.h
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/include/lldb/Breakpoint/BreakpointLocation.h')
-rw-r--r--lldb/include/lldb/Breakpoint/BreakpointLocation.h70
1 files changed, 0 insertions, 70 deletions
diff --git a/lldb/include/lldb/Breakpoint/BreakpointLocation.h b/lldb/include/lldb/Breakpoint/BreakpointLocation.h
index b156165771b..7b27160563a 100644
--- a/lldb/include/lldb/Breakpoint/BreakpointLocation.h
+++ b/lldb/include/lldb/Breakpoint/BreakpointLocation.h
@@ -20,13 +20,10 @@
namespace lldb_private {
-//----------------------------------------------------------------------
/// \class BreakpointLocation BreakpointLocation.h
/// "lldb/Breakpoint/BreakpointLocation.h" Class that manages one unique (by
/// address) instance of a logical breakpoint.
-//----------------------------------------------------------------------
-//----------------------------------------------------------------------
/// General Outline:
/// A breakpoint location is defined by the breakpoint that produces it,
/// and the address that resulted in this particular instantiation. Each
@@ -36,7 +33,6 @@ namespace lldb_private {
/// FIXME: Should we also store some fingerprint for the location, so
/// we can map one location to the "equivalent location" on rerun? This would
/// be useful if you've set options on the locations.
-//----------------------------------------------------------------------
class BreakpointLocation
: public std::enable_shared_from_this<BreakpointLocation>,
@@ -44,27 +40,20 @@ class BreakpointLocation
public:
~BreakpointLocation() override;
- //------------------------------------------------------------------
/// Gets the load address for this breakpoint location \return
/// Returns breakpoint location load address, \b
/// LLDB_INVALID_ADDRESS if not yet set.
- //------------------------------------------------------------------
lldb::addr_t GetLoadAddress() const override;
- //------------------------------------------------------------------
/// Gets the Address for this breakpoint location \return
/// Returns breakpoint location Address.
- //------------------------------------------------------------------
Address &GetAddress();
- //------------------------------------------------------------------
/// Gets the Breakpoint that created this breakpoint location \return
/// Returns the owning breakpoint.
- //------------------------------------------------------------------
Breakpoint &GetBreakpoint();
Target &GetTarget();
- //------------------------------------------------------------------
/// Determines whether we should stop due to a hit at this breakpoint
/// location.
///
@@ -74,56 +63,40 @@ public:
/// \return
/// \b true if this breakpoint location thinks we should stop,
/// \b false otherwise.
- //------------------------------------------------------------------
bool ShouldStop(StoppointCallbackContext *context) override;
- //------------------------------------------------------------------
// The next section deals with various breakpoint options.
- //------------------------------------------------------------------
- //------------------------------------------------------------------
/// If \a enable is \b true, enable the breakpoint, if \b false disable it.
- //------------------------------------------------------------------
void SetEnabled(bool enabled);
- //------------------------------------------------------------------
/// Check the Enable/Disable state.
///
/// \return
/// \b true if the breakpoint is enabled, \b false if disabled.
- //------------------------------------------------------------------
bool IsEnabled() const;
- //------------------------------------------------------------------
/// If \a auto_continue is \b true, set the breakpoint to continue when hit.
- //------------------------------------------------------------------
void SetAutoContinue(bool auto_continue);
- //------------------------------------------------------------------
/// Check the AutoContinue state.
///
/// \return
/// \b true if the breakpoint is set to auto-continue, \b false if not.
- //------------------------------------------------------------------
bool IsAutoContinue() const;
- //------------------------------------------------------------------
/// Return the current Ignore Count.
///
/// \return
/// The number of breakpoint hits to be ignored.
- //------------------------------------------------------------------
uint32_t GetIgnoreCount();
- //------------------------------------------------------------------
/// Set the breakpoint to ignore the next \a count breakpoint hits.
///
/// \param[in] count
/// The number of breakpoint hits to ignore.
- //------------------------------------------------------------------
void SetIgnoreCount(uint32_t n);
- //------------------------------------------------------------------
/// Set the callback action invoked when the breakpoint is hit.
///
/// The callback will return a bool indicating whether the target should
@@ -137,7 +110,6 @@ public:
/// for the callback.
///
/// \see lldb_private::Baton
- //------------------------------------------------------------------
void SetCallback(BreakpointHitCallback callback,
const lldb::BatonSP &callback_baton_sp, bool is_synchronous);
@@ -146,31 +118,25 @@ public:
void ClearCallback();
- //------------------------------------------------------------------
/// Set the breakpoint location's condition.
///
/// \param[in] condition
/// The condition expression to evaluate when the breakpoint is hit.
- //------------------------------------------------------------------
void SetCondition(const char *condition);
- //------------------------------------------------------------------
/// Return a pointer to the text of the condition expression.
///
/// \return
/// A pointer to the condition expression text, or nullptr if no
// condition has been set.
- //------------------------------------------------------------------
const char *GetConditionText(size_t *hash = nullptr) const;
bool ConditionSaysStop(ExecutionContext &exe_ctx, Status &error);
- //------------------------------------------------------------------
/// Set the valid thread to be checked when the breakpoint is hit.
///
/// \param[in] thread_id
/// If this thread hits the breakpoint, we stop, otherwise not.
- //------------------------------------------------------------------
void SetThreadID(lldb::tid_t thread_id);
lldb::tid_t GetThreadID();
@@ -187,43 +153,32 @@ public:
const char *GetQueueName() const;
- //------------------------------------------------------------------
// The next section deals with this location's breakpoint sites.
- //------------------------------------------------------------------
- //------------------------------------------------------------------
/// Try to resolve the breakpoint site for this location.
///
/// \return
/// \b true if we were successful at setting a breakpoint site,
/// \b false otherwise.
- //------------------------------------------------------------------
bool ResolveBreakpointSite();
- //------------------------------------------------------------------
/// Clear this breakpoint location's breakpoint site - for instance when
/// disabling the breakpoint.
///
/// \return
/// \b true if there was a breakpoint site to be cleared, \b false
/// otherwise.
- //------------------------------------------------------------------
bool ClearBreakpointSite();
- //------------------------------------------------------------------
/// Return whether this breakpoint location has a breakpoint site. \return
/// \b true if there was a breakpoint site for this breakpoint
/// location, \b false otherwise.
- //------------------------------------------------------------------
bool IsResolved() const;
lldb::BreakpointSiteSP GetBreakpointSite() const;
- //------------------------------------------------------------------
// The next section are generic report functions.
- //------------------------------------------------------------------
- //------------------------------------------------------------------
/// Print a description of this breakpoint location to the stream \a s.
///
/// \param[in] s
@@ -234,15 +189,11 @@ public:
/// provide.
///
/// \see lldb::DescriptionLevel
- //------------------------------------------------------------------
void GetDescription(Stream *s, lldb::DescriptionLevel level);
- //------------------------------------------------------------------
/// Standard "Dump" method. At present it does nothing.
- //------------------------------------------------------------------
void Dump(Stream *s) const override;
- //------------------------------------------------------------------
/// Use this to set location specific breakpoint options.
///
/// It will create a copy of the containing breakpoint's options if that
@@ -250,10 +201,8 @@ public:
///
/// \return
/// A pointer to the breakpoint options.
- //------------------------------------------------------------------
BreakpointOptions *GetLocationOptions();
- //------------------------------------------------------------------
/// Use this to access breakpoint options from this breakpoint location.
/// This will return the options that have a setting for the specified
/// BreakpointOptions kind.
@@ -263,13 +212,11 @@ public:
/// \return
/// A pointer to the containing breakpoint's options if this
/// location doesn't have its own copy.
- //------------------------------------------------------------------
const BreakpointOptions *GetOptionsSpecifyingKind(
BreakpointOptions::OptionKind kind) const;
bool ValidForThisThread(Thread *thread);
- //------------------------------------------------------------------
/// Invoke the callback action when the breakpoint is hit.
///
/// Meant to be used by the BreakpointLocation class.
@@ -283,44 +230,36 @@ public:
/// \return
/// \b true if the target should stop at this breakpoint and \b
/// false not.
- //------------------------------------------------------------------
bool InvokeCallback(StoppointCallbackContext *context);
- //------------------------------------------------------------------
/// Returns whether we should resolve Indirect functions in setting the
/// breakpoint site for this location.
///
/// \return
/// \b true if the breakpoint SITE for this location should be set on the
/// resolved location for Indirect functions.
- //------------------------------------------------------------------
bool ShouldResolveIndirectFunctions() {
return m_should_resolve_indirect_functions;
}
- //------------------------------------------------------------------
/// Returns whether the address set in the breakpoint site for this location
/// was found by resolving an indirect symbol.
///
/// \return
/// \b true or \b false as given in the description above.
- //------------------------------------------------------------------
bool IsIndirect() { return m_is_indirect; }
void SetIsIndirect(bool is_indirect) { m_is_indirect = is_indirect; }
- //------------------------------------------------------------------
/// Returns whether the address set in the breakpoint location was re-routed
/// to the target of a re-exported symbol.
///
/// \return
/// \b true or \b false as given in the description above.
- //------------------------------------------------------------------
bool IsReExported() { return m_is_reexported; }
void SetIsReExported(bool is_reexported) { m_is_reexported = is_reexported; }
- //------------------------------------------------------------------
/// Returns whether the two breakpoint locations might represent "equivalent
/// locations". This is used when modules changed to determine if a Location
/// in the old module might be the "same as" the input location.
@@ -330,7 +269,6 @@ public:
///
/// \return
/// \b true or \b false as given in the description above.
- //------------------------------------------------------------------
bool EquivalentToLocation(BreakpointLocation &location);
protected:
@@ -339,7 +277,6 @@ protected:
friend class Process;
friend class StopInfoBreakpoint;
- //------------------------------------------------------------------
/// Set the breakpoint site for this location to \a bp_site_sp.
///
/// \param[in] bp_site_sp
@@ -348,7 +285,6 @@ protected:
/// \return
/// \b true if we were successful at setting the breakpoint site,
/// \b false otherwise.
- //------------------------------------------------------------------
bool SetBreakpointSite(lldb::BreakpointSiteSP &bp_site_sp);
void DecrementIgnoreCount();
@@ -362,13 +298,10 @@ private:
void UndoBumpHitCount();
- //------------------------------------------------------------------
// Constructors and Destructors
//
// Only the Breakpoint can make breakpoint locations, and it owns them.
- //------------------------------------------------------------------
- //------------------------------------------------------------------
/// Constructor.
///
/// \param[in] owner
@@ -383,15 +316,12 @@ private:
///
/// \param[in] hardware
/// \b true if a hardware breakpoint is requested.
- //------------------------------------------------------------------
BreakpointLocation(lldb::break_id_t bid, Breakpoint &owner,
const Address &addr, lldb::tid_t tid, bool hardware,
bool check_for_resolver = true);
- //------------------------------------------------------------------
// Data members:
- //------------------------------------------------------------------
bool m_being_created;
bool m_should_resolve_indirect_functions;
bool m_is_reexported;
OpenPOWER on IntegriCloud