aboutsummaryrefslogtreecommitdiffstats
path: root/include/lldb/Breakpoint
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-12-30 11:55:28 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-12-30 11:55:28 +0000
commite81d9d49145e432d917eea3a70d2ae74dcad1d89 (patch)
tree9ed5e1a91f242e2cb5911577356e487a55c01b78 /include/lldb/Breakpoint
parent85d8ef8f1f0e0e063a8571944302be2d2026f823 (diff)
downloadsrc-e81d9d49145e432d917eea3a70d2ae74dcad1d89.tar.gz
src-e81d9d49145e432d917eea3a70d2ae74dcad1d89.zip
Vendor import of stripped lldb trunk r256633:
Notes
Notes: svn path=/vendor/lldb/dist/; revision=292932
Diffstat (limited to 'include/lldb/Breakpoint')
-rw-r--r--include/lldb/Breakpoint/Breakpoint.h61
-rw-r--r--include/lldb/Breakpoint/BreakpointLocation.h28
-rw-r--r--include/lldb/Breakpoint/BreakpointLocationList.h23
-rw-r--r--include/lldb/Breakpoint/BreakpointOptions.h31
-rw-r--r--include/lldb/Breakpoint/BreakpointResolver.h9
-rw-r--r--include/lldb/Breakpoint/BreakpointResolverAddress.h17
-rw-r--r--include/lldb/Breakpoint/BreakpointResolverFileLine.h5
-rw-r--r--include/lldb/Breakpoint/BreakpointResolverFileRegex.h5
-rw-r--r--include/lldb/Breakpoint/BreakpointResolverName.h11
-rw-r--r--include/lldb/Breakpoint/BreakpointSite.h25
-rw-r--r--include/lldb/Breakpoint/Watchpoint.h58
-rw-r--r--include/lldb/Breakpoint/WatchpointOptions.h27
12 files changed, 150 insertions, 150 deletions
diff --git a/include/lldb/Breakpoint/Breakpoint.h b/include/lldb/Breakpoint/Breakpoint.h
index a70c2787a1ef..7fdf06da3936 100644
--- a/include/lldb/Breakpoint/Breakpoint.h
+++ b/include/lldb/Breakpoint/Breakpoint.h
@@ -12,7 +12,10 @@
// C Includes
// C++ Includes
+#include <memory>
+#include <string>
#include <unordered_set>
+#include <vector>
// Other libraries and framework includes
// Project includes
@@ -81,11 +84,9 @@ class Breakpoint:
public Stoppoint
{
public:
-
static const ConstString &
GetEventIdentifier ();
-
//------------------------------------------------------------------
/// An enum specifying the match style for breakpoint settings. At
/// present only used for function name style breakpoints.
@@ -101,18 +102,16 @@ public:
public EventData
{
public:
+ BreakpointEventData (lldb::BreakpointEventType sub_type,
+ const lldb::BreakpointSP &new_breakpoint_sp);
+
+ ~BreakpointEventData() override;
static const ConstString &
GetFlavorString ();
- virtual const ConstString &
- GetFlavor () const;
-
- BreakpointEventData (lldb::BreakpointEventType sub_type,
- const lldb::BreakpointSP &new_breakpoint_sp);
-
- virtual
- ~BreakpointEventData();
+ const ConstString &
+ GetFlavor() const override;
lldb::BreakpointEventType
GetBreakpointEventType () const;
@@ -126,9 +125,8 @@ public:
return m_locations;
}
-
- virtual void
- Dump (Stream *s) const;
+ void
+ Dump(Stream *s) const override;
static lldb::BreakpointEventType
GetBreakpointEventTypeFromEvent (const lldb::EventSP &event_sp);
@@ -146,7 +144,6 @@ public:
GetEventDataFromEvent (const Event *event_sp);
private:
-
lldb::BreakpointEventType m_breakpoint_event;
lldb::BreakpointSP m_new_breakpoint_sp;
BreakpointLocationCollection m_locations;
@@ -154,11 +151,10 @@ public:
DISALLOW_COPY_AND_ASSIGN (BreakpointEventData);
};
-
class BreakpointPrecondition
{
public:
- virtual ~BreakpointPrecondition() {}
+ virtual ~BreakpointPrecondition() = default;
virtual bool
EvaluatePrecondition(StoppointCallbackContext &context);
@@ -167,7 +163,7 @@ public:
ConfigurePrecondition(Args &options);
virtual void
- DescribePrecondition(Stream &stream, lldb::DescriptionLevel level);
+ GetDescription(Stream &stream, lldb::DescriptionLevel level);
};
typedef std::shared_ptr<BreakpointPrecondition> BreakpointPreconditionSP;
@@ -179,7 +175,7 @@ public:
/// breakpoints. The varieties of breakpoints are specified instead by
/// providing different resolvers & filters.
//------------------------------------------------------------------
- ~Breakpoint();
+ ~Breakpoint() override;
//------------------------------------------------------------------
// Methods
@@ -197,14 +193,13 @@ public:
/// Standard "Dump" method. At present it does nothing.
//------------------------------------------------------------------
void
- Dump (Stream *s);
+ Dump(Stream *s) override;
//------------------------------------------------------------------
// The next set of methods provide ways to tell the breakpoint to update
// it's location list - usually done when modules appear or disappear.
//------------------------------------------------------------------
-
//------------------------------------------------------------------
/// Tell this breakpoint to clear all its breakpoint sites. Done
/// when the process holding the breakpoint sites is destroyed.
@@ -262,7 +257,6 @@ public:
bool load_event,
bool delete_locations = false);
-
//------------------------------------------------------------------
/// Tells the breakpoint the old module \a old_module_sp has been
/// replaced by new_module_sp (usually because the underlying file has been
@@ -294,8 +288,8 @@ public:
/// Returns a pointer to the new location.
//------------------------------------------------------------------
lldb::BreakpointLocationSP
- AddLocation (const Address &addr,
- bool *new_location = NULL);
+ AddLocation(const Address &addr,
+ bool *new_location = nullptr);
//------------------------------------------------------------------
/// Find a breakpoint location by Address.
@@ -304,7 +298,7 @@ public:
/// The Address specifying the location.
/// @return
/// Returns a shared pointer to the location at \a addr. The pointer
- /// in the shared pointer will be NULL if there is no location at that address.
+ /// in the shared pointer will be nullptr if there is no location at that address.
//------------------------------------------------------------------
lldb::BreakpointLocationSP
FindLocationByAddress (const Address &addr);
@@ -328,7 +322,7 @@ public:
/// The ID specifying the location.
/// @return
/// Returns a shared pointer to the location with ID \a bp_loc_id. The pointer
- /// in the shared pointer will be NULL if there is no location with that ID.
+ /// in the shared pointer will be nullptr if there is no location with that ID.
//------------------------------------------------------------------
lldb::BreakpointLocationSP
FindLocationByID (lldb::break_id_t bp_loc_id);
@@ -341,7 +335,7 @@ public:
///
/// @return
/// Returns a shared pointer to the location with index \a
- /// index. The shared pointer might contain NULL if \a index is
+ /// index. The shared pointer might contain nullptr if \a index is
/// greater than then number of actual locations.
//------------------------------------------------------------------
lldb::BreakpointLocationSP
@@ -373,7 +367,7 @@ public:
/// If \a enable is \b true, enable the breakpoint, if \b false disable it.
//------------------------------------------------------------------
void
- SetEnabled (bool enable);
+ SetEnabled(bool enable) override;
//------------------------------------------------------------------
/// Check the Enable/Disable state.
@@ -381,7 +375,7 @@ public:
/// \b true if the breakpoint is enabled, \b false if disabled.
//------------------------------------------------------------------
bool
- IsEnabled ();
+ IsEnabled() override;
//------------------------------------------------------------------
/// Set the breakpoint to ignore the next \a count breakpoint hits.
@@ -407,7 +401,6 @@ public:
uint32_t
GetHitCount () const;
-
//------------------------------------------------------------------
/// If \a one_shot is \b true, breakpoint will be deleted on first hit.
//------------------------------------------------------------------
@@ -490,7 +483,7 @@ public:
///
/// @param[in] condition
/// The condition expression to evaluate when the breakpoint is hit.
- /// Pass in NULL to clear the condition.
+ /// Pass in nullptr to clear the condition.
//------------------------------------------------------------------
void SetCondition (const char *condition);
@@ -498,7 +491,7 @@ public:
/// Return a pointer to the text of the condition expression.
///
/// @return
- /// A pointer to the condition expression text, or NULL if no
+ /// A pointer to the condition expression text, or nullptr if no
// condition has been set.
//------------------------------------------------------------------
const char *GetConditionText () const;
@@ -560,7 +553,7 @@ public:
/// Return the "kind" description for a breakpoint.
///
/// @return
- /// The breakpoint kind, or NULL if none is set.
+ /// The breakpoint kind, or nullptr if none is set.
//------------------------------------------------------------------
const char *GetBreakpointKind () const
{
@@ -619,7 +612,6 @@ public:
BreakpointOptions *
GetOptions ();
-
//------------------------------------------------------------------
/// Invoke the callback action when the breakpoint is hit.
///
@@ -713,7 +705,6 @@ protected:
// Protected Methods
//------------------------------------------------------------------
-
//------------------------------------------------------------------
/// Constructors and Destructors
/// Only the Target can make a breakpoint, and it owns the breakpoint lifespans.
@@ -807,4 +798,4 @@ private:
} // namespace lldb_private
-#endif // liblldb_Breakpoint_h_
+#endif // liblldb_Breakpoint_h_
diff --git a/include/lldb/Breakpoint/BreakpointLocation.h b/include/lldb/Breakpoint/BreakpointLocation.h
index c3e620d085c6..58d144cfb668 100644
--- a/include/lldb/Breakpoint/BreakpointLocation.h
+++ b/include/lldb/Breakpoint/BreakpointLocation.h
@@ -11,12 +11,10 @@
#define liblldb_BreakpointLocation_h_
// C Includes
-
// C++ Includes
-#include <list>
+#include <memory>
// Other libraries and framework includes
-
// Project includes
#include "lldb/lldb-private.h"
#include "lldb/Breakpoint/StoppointLocation.h"
@@ -49,7 +47,7 @@ class BreakpointLocation :
public StoppointLocation
{
public:
- ~BreakpointLocation ();
+ ~BreakpointLocation() override;
//------------------------------------------------------------------
/// Gets the load address for this breakpoint location
@@ -58,7 +56,7 @@ public:
/// LLDB_INVALID_ADDRESS if not yet set.
//------------------------------------------------------------------
lldb::addr_t
- GetLoadAddress () const;
+ GetLoadAddress() const override;
//------------------------------------------------------------------
/// Gets the Address for this breakpoint location
@@ -74,6 +72,9 @@ public:
//------------------------------------------------------------------
Breakpoint &
GetBreakpoint ();
+
+ Target &
+ GetTarget();
//------------------------------------------------------------------
/// Determines whether we should stop due to a hit at this
@@ -88,7 +89,7 @@ public:
/// \b false otherwise.
//------------------------------------------------------------------
bool
- ShouldStop (StoppointCallbackContext *context);
+ ShouldStop(StoppointCallbackContext *context) override;
//------------------------------------------------------------------
// The next section deals with various breakpoint options.
@@ -169,16 +170,15 @@ public:
/// Return a pointer to the text of the condition expression.
///
/// @return
- /// A pointer to the condition expression text, or NULL if no
+ /// A pointer to the condition expression text, or nullptr if no
// condition has been set.
//------------------------------------------------------------------
const char *
- GetConditionText (size_t *hash = NULL) const;
+ GetConditionText(size_t *hash = nullptr) const;
bool
ConditionSaysStop (ExecutionContext &exe_ctx, Error &error);
-
//------------------------------------------------------------------
/// Set the valid thread to be checked when the breakpoint is hit.
///
@@ -270,7 +270,7 @@ public:
/// Standard "Dump" method. At present it does nothing.
//------------------------------------------------------------------
void
- Dump (Stream *s) const;
+ Dump(Stream *s) const override;
//------------------------------------------------------------------
/// Use this to set location specific breakpoint options.
@@ -299,7 +299,6 @@ public:
bool
ValidForThisThread (Thread *thread);
-
//------------------------------------------------------------------
/// Invoke the callback action when the breakpoint is hit.
///
@@ -418,7 +417,6 @@ private:
void
UndoBumpHitCount();
-
//------------------------------------------------------------------
// Constructors and Destructors
//
@@ -459,9 +457,9 @@ private:
bool m_is_indirect;
Address m_address; ///< The address defining this location.
Breakpoint &m_owner; ///< The breakpoint that produced this object.
- std::unique_ptr<BreakpointOptions> m_options_ap; ///< Breakpoint options pointer, NULL if we're using our breakpoint's options.
+ std::unique_ptr<BreakpointOptions> m_options_ap; ///< Breakpoint options pointer, nullptr if we're using our breakpoint's options.
lldb::BreakpointSiteSP m_bp_site_sp; ///< Our breakpoint site (it may be shared by more than one location.)
- lldb::ClangUserExpressionSP m_user_expression_sp; ///< The compiled expression to use in testing our condition.
+ lldb::UserExpressionSP m_user_expression_sp; ///< The compiled expression to use in testing our condition.
Mutex m_condition_mutex; ///< Guards parsing and evaluation of the condition, which could be evaluated by multiple processes.
size_t m_condition_hash; ///< For testing whether the condition source code changed.
@@ -479,4 +477,4 @@ private:
} // namespace lldb_private
-#endif // liblldb_BreakpointLocation_h_
+#endif // liblldb_BreakpointLocation_h_
diff --git a/include/lldb/Breakpoint/BreakpointLocationList.h b/include/lldb/Breakpoint/BreakpointLocationList.h
index f67ef89ad705..81526089b427 100644
--- a/include/lldb/Breakpoint/BreakpointLocationList.h
+++ b/include/lldb/Breakpoint/BreakpointLocationList.h
@@ -12,8 +12,9 @@
// C Includes
// C++ Includes
-#include <vector>
#include <map>
+#include <vector>
+
// Other libraries and framework includes
// Project includes
#include "lldb/lldb-private.h"
@@ -56,7 +57,7 @@ public:
/// The address to look for.
///
/// @result
- /// A shared pointer to the breakpoint. May contain a NULL
+ /// A shared pointer to the breakpoint. May contain a nullptr
/// pointer if the breakpoint doesn't exist.
//------------------------------------------------------------------
const lldb::BreakpointLocationSP
@@ -70,7 +71,7 @@ public:
/// The breakpoint location ID to seek for.
///
/// @result
- /// A shared pointer to the breakpoint. May contain a NULL
+ /// A shared pointer to the breakpoint. May contain a nullptr
/// pointer if the breakpoint doesn't exist.
//------------------------------------------------------------------
lldb::BreakpointLocationSP
@@ -116,7 +117,7 @@ public:
/// The breakpoint location index to seek for.
///
/// @result
- /// A shared pointer to the breakpoint. May contain a NULL
+ /// A shared pointer to the breakpoint. May contain a nullptr
/// pointer if the breakpoint doesn't exist.
//------------------------------------------------------------------
lldb::BreakpointLocationSP
@@ -130,7 +131,7 @@ public:
/// The breakpoint location index to seek for.
///
/// @result
- /// A shared pointer to the breakpoint. May contain a NULL
+ /// A shared pointer to the breakpoint. May contain a nullptr
/// pointer if the breakpoint doesn't exist.
//------------------------------------------------------------------
const lldb::BreakpointLocationSP
@@ -216,7 +217,6 @@ public:
lldb::DescriptionLevel level);
protected:
-
//------------------------------------------------------------------
/// This is the standard constructor.
///
@@ -246,9 +246,9 @@ protected:
StopRecordingNewLocations();
lldb::BreakpointLocationSP
- AddLocation (const Address &addr,
- bool resolve_indirect_symbols,
- bool *new_location = NULL);
+ AddLocation(const Address &addr,
+ bool resolve_indirect_symbols,
+ bool *new_location = nullptr);
void
SwapLocation (lldb::BreakpointLocationSP to_location_sp, lldb::BreakpointLocationSP from_location_sp);
@@ -273,16 +273,17 @@ protected:
mutable Mutex m_mutex;
lldb::break_id_t m_next_id;
BreakpointLocationCollection *m_new_location_recorder;
+
public:
typedef AdaptedIterable<collection, lldb::BreakpointLocationSP, vector_adapter> BreakpointLocationIterable;
+
BreakpointLocationIterable
BreakpointLocations()
{
return BreakpointLocationIterable(m_locations);
}
-
};
} // namespace lldb_private
-#endif // liblldb_BreakpointLocationList_h_
+#endif // liblldb_BreakpointLocationList_h_
diff --git a/include/lldb/Breakpoint/BreakpointOptions.h b/include/lldb/Breakpoint/BreakpointOptions.h
index bf10fc096d75..e7882147a4da 100644
--- a/include/lldb/Breakpoint/BreakpointOptions.h
+++ b/include/lldb/Breakpoint/BreakpointOptions.h
@@ -12,6 +12,9 @@
// C Includes
// C++ Includes
+#include <memory>
+#include <string>
+
// Other libraries and framework includes
// Project includes
#include "lldb/lldb-private.h"
@@ -115,7 +118,6 @@ public:
//------------------------------------------------------------------
void SetCallback (BreakpointHitCallback callback, const lldb::BatonSP &baton_sp, bool synchronous = false);
-
//------------------------------------------------------------------
/// Remove the callback from this option set.
//------------------------------------------------------------------
@@ -184,10 +186,10 @@ public:
/// Return a pointer to the text of the condition expression.
///
/// @return
- /// A pointer to the condition expression text, or NULL if no
+ /// A pointer to the condition expression text, or nullptr if no
// condition has been set.
//------------------------------------------------------------------
- const char *GetConditionText (size_t *hash = NULL) const;
+ const char *GetConditionText(size_t *hash = nullptr) const;
//------------------------------------------------------------------
// Enabled/Ignore Count
@@ -257,10 +259,10 @@ public:
}
//------------------------------------------------------------------
- /// Return the current thread spec for this option. This will return NULL if the no thread
+ /// Return the current thread spec for this option. This will return nullptr if the no thread
/// specifications have been set for this Option yet.
/// @return
- /// The thread specification pointer for this option, or NULL if none has
+ /// The thread specification pointer for this option, or nullptr if none has
/// been set yet.
//------------------------------------------------------------------
const ThreadSpec *
@@ -298,7 +300,6 @@ public:
lldb::user_id_t break_id,
lldb::user_id_t break_loc_id);
-
struct CommandData
{
CommandData () :
@@ -308,10 +309,8 @@ public:
{
}
- ~CommandData ()
- {
- }
-
+ ~CommandData() = default;
+
StringList user_source;
std::string script_source;
bool stop_on_error;
@@ -325,16 +324,14 @@ public:
{
}
- virtual
- ~CommandBaton ()
+ ~CommandBaton() override
{
delete ((CommandData *)m_data);
- m_data = NULL;
+ m_data = nullptr;
}
- virtual void
- GetDescription (Stream *s, lldb::DescriptionLevel level) const;
-
+ void
+ GetDescription (Stream *s, lldb::DescriptionLevel level) const override;
};
protected:
@@ -359,4 +356,4 @@ private:
} // namespace lldb_private
-#endif // liblldb_BreakpointOptions_h_
+#endif // liblldb_BreakpointOptions_h_
diff --git a/include/lldb/Breakpoint/BreakpointResolver.h b/include/lldb/Breakpoint/BreakpointResolver.h
index 6ba53ea92f36..198abed841b2 100644
--- a/include/lldb/Breakpoint/BreakpointResolver.h
+++ b/include/lldb/Breakpoint/BreakpointResolver.h
@@ -66,8 +66,7 @@ public:
/// The Destructor is virtual, all significant breakpoint resolvers derive
/// from this class.
//------------------------------------------------------------------
- virtual
- ~BreakpointResolver ();
+ ~BreakpointResolver() override;
//------------------------------------------------------------------
/// This sets the breakpoint for this resolver.
@@ -105,8 +104,8 @@ public:
/// @param[in] s
/// Stream to which the output is copied.
//------------------------------------------------------------------
- virtual void
- GetDescription (Stream *s) = 0;
+ void
+ GetDescription(Stream *s) override = 0;
//------------------------------------------------------------------
/// Standard "Dump" method. At present it does nothing.
@@ -157,4 +156,4 @@ private:
} // namespace lldb_private
-#endif // liblldb_BreakpointResolver_h_
+#endif // liblldb_BreakpointResolver_h_
diff --git a/include/lldb/Breakpoint/BreakpointResolverAddress.h b/include/lldb/Breakpoint/BreakpointResolverAddress.h
index c8f034d7345b..8ec1e39e52ab 100644
--- a/include/lldb/Breakpoint/BreakpointResolverAddress.h
+++ b/include/lldb/Breakpoint/BreakpointResolverAddress.h
@@ -15,6 +15,7 @@
// Other libraries and framework includes
// Project includes
#include "lldb/Breakpoint/BreakpointResolver.h"
+#include "lldb/Core/ModuleSpec.h"
namespace lldb_private {
@@ -31,8 +32,11 @@ public:
BreakpointResolverAddress (Breakpoint *bkpt,
const Address &addr);
- virtual
- ~BreakpointResolverAddress ();
+ BreakpointResolverAddress (Breakpoint *bkpt,
+ const Address &addr,
+ const FileSpec &module_spec);
+
+ ~BreakpointResolverAddress() override;
void
ResolveBreakpoint (SearchFilter &filter) override;
@@ -66,12 +70,15 @@ public:
CopyForBreakpoint (Breakpoint &breakpoint) override;
protected:
- Address m_addr;
-
+ Address m_addr; // The address - may be Section Offset or may be just an offset
+ lldb::addr_t m_resolved_addr; // The current value of the resolved load address for this breakpoint,
+ FileSpec m_module_filespec; // If this filespec is Valid, and m_addr is an offset, then it will be converted
+ // to a Section+Offset address in this module, whenever that module gets around to
+ // being loaded.
private:
DISALLOW_COPY_AND_ASSIGN(BreakpointResolverAddress);
};
} // namespace lldb_private
-#endif // liblldb_BreakpointResolverAddress_h_
+#endif // liblldb_BreakpointResolverAddress_h_
diff --git a/include/lldb/Breakpoint/BreakpointResolverFileLine.h b/include/lldb/Breakpoint/BreakpointResolverFileLine.h
index 2403d24515a7..2dde1546f126 100644
--- a/include/lldb/Breakpoint/BreakpointResolverFileLine.h
+++ b/include/lldb/Breakpoint/BreakpointResolverFileLine.h
@@ -35,8 +35,7 @@ public:
bool skip_prologue,
bool exact_match);
- virtual
- ~BreakpointResolverFileLine ();
+ ~BreakpointResolverFileLine() override;
Searcher::CallbackReturn
SearchCallback (SearchFilter &filter,
@@ -76,4 +75,4 @@ private:
} // namespace lldb_private
-#endif // liblldb_BreakpointResolverFileLine_h_
+#endif // liblldb_BreakpointResolverFileLine_h_
diff --git a/include/lldb/Breakpoint/BreakpointResolverFileRegex.h b/include/lldb/Breakpoint/BreakpointResolverFileRegex.h
index 8e18fff16447..a8d7a50b5d93 100644
--- a/include/lldb/Breakpoint/BreakpointResolverFileRegex.h
+++ b/include/lldb/Breakpoint/BreakpointResolverFileRegex.h
@@ -32,8 +32,7 @@ public:
RegularExpression &regex,
bool exact_match);
- virtual
- ~BreakpointResolverFileRegex ();
+ ~BreakpointResolverFileRegex() override;
Searcher::CallbackReturn
SearchCallback (SearchFilter &filter,
@@ -70,4 +69,4 @@ private:
} // namespace lldb_private
-#endif // liblldb_BreakpointResolverFileRegex_h_
+#endif // liblldb_BreakpointResolverFileRegex_h_
diff --git a/include/lldb/Breakpoint/BreakpointResolverName.h b/include/lldb/Breakpoint/BreakpointResolverName.h
index c2a5b180f289..aaae9c1a12cf 100644
--- a/include/lldb/Breakpoint/BreakpointResolverName.h
+++ b/include/lldb/Breakpoint/BreakpointResolverName.h
@@ -14,6 +14,7 @@
// C++ Includes
#include <vector>
#include <string>
+
// Other libraries and framework includes
// Project includes
#include "lldb/Breakpoint/BreakpointResolver.h"
@@ -34,6 +35,7 @@ public:
BreakpointResolverName (Breakpoint *bkpt,
const char *name,
uint32_t name_type_mask,
+ lldb::LanguageType language,
Breakpoint::MatchType type,
bool skip_prologue);
@@ -42,17 +44,20 @@ public:
const char *names[],
size_t num_names,
uint32_t name_type_mask,
+ lldb::LanguageType language,
bool skip_prologue);
// This one takes a C++ array of names. It is always MatchType = Exact.
BreakpointResolverName (Breakpoint *bkpt,
std::vector<std::string> names,
uint32_t name_type_mask,
+ lldb::LanguageType language,
bool skip_prologue);
// Creates a function breakpoint by regular expression. Takes over control of the lifespan of func_regex.
BreakpointResolverName (Breakpoint *bkpt,
RegularExpression &func_regex,
+ lldb::LanguageType language,
bool skip_prologue);
BreakpointResolverName (Breakpoint *bkpt,
@@ -61,8 +66,7 @@ public:
Breakpoint::MatchType type,
bool skip_prologue);
- virtual
- ~BreakpointResolverName ();
+ ~BreakpointResolverName() override;
Searcher::CallbackReturn
SearchCallback (SearchFilter &filter,
@@ -114,6 +118,7 @@ protected:
ConstString m_class_name;
RegularExpression m_regex;
Breakpoint::MatchType m_match_type;
+ lldb::LanguageType m_language;
bool m_skip_prologue;
void
@@ -122,4 +127,4 @@ protected:
} // namespace lldb_private
-#endif // liblldb_BreakpointResolverName_h_
+#endif // liblldb_BreakpointResolverName_h_
diff --git a/include/lldb/Breakpoint/BreakpointSite.h b/include/lldb/Breakpoint/BreakpointSite.h
index d67fc8bb57f1..6cebcab8e2db 100644
--- a/include/lldb/Breakpoint/BreakpointSite.h
+++ b/include/lldb/Breakpoint/BreakpointSite.h
@@ -55,7 +55,7 @@ public:
// display any breakpoint opcodes.
};
- virtual ~BreakpointSite ();
+ ~BreakpointSite() override;
//----------------------------------------------------------------------
// This section manages the breakpoint traps
@@ -139,8 +139,8 @@ public:
/// @return
/// \b true if we should stop, \b false otherwise.
//------------------------------------------------------------------
- virtual bool
- ShouldStop (StoppointCallbackContext *context);
+ bool
+ ShouldStop(StoppointCallbackContext *context) override;
//------------------------------------------------------------------
/// Standard Dump method
@@ -149,7 +149,7 @@ public:
/// The stream to dump this output.
//------------------------------------------------------------------
void
- Dump (Stream *s) const;
+ Dump(Stream *s) const override;
//------------------------------------------------------------------
/// The "Owners" are the breakpoint locations that share this
@@ -187,6 +187,20 @@ public:
GetOwnerAtIndex (size_t idx);
//------------------------------------------------------------------
+ /// This method copies the breakpoint site's owners into a new collection.
+ /// It does this while the owners mutex is locked.
+ ///
+ /// @param[out] out_collection
+ /// The BreakpointLocationCollection into which to put the owners
+ /// of this breakpoint site.
+ ///
+ /// @return
+ /// The number of elements copied into out_collection.
+ //------------------------------------------------------------------
+ size_t
+ CopyOwnersList (BreakpointLocationCollection &out_collection);
+
+ //------------------------------------------------------------------
/// Check whether the owners of this breakpoint site have any
/// thread specifiers, and if yes, is \a thread contained in any
/// of these specifiers.
@@ -201,7 +215,6 @@ public:
bool
ValidForThisThread (Thread *thread);
-
//------------------------------------------------------------------
/// Print a description of this breakpoint site to the stream \a s.
/// GetDescription tells you about the breakpoint site's owners.
@@ -301,4 +314,4 @@ private:
} // namespace lldb_private
-#endif // liblldb_BreakpointSite_h_
+#endif // liblldb_BreakpointSite_h_
diff --git a/include/lldb/Breakpoint/Watchpoint.h b/include/lldb/Breakpoint/Watchpoint.h
index 926e0b506f31..34df24a92c06 100644
--- a/include/lldb/Breakpoint/Watchpoint.h
+++ b/include/lldb/Breakpoint/Watchpoint.h
@@ -11,19 +11,17 @@
#define liblldb_Watchpoint_h_
// C Includes
-
// C++ Includes
-#include <list>
+#include <memory>
#include <string>
// Other libraries and framework includes
-
// Project includes
#include "lldb/lldb-private.h"
#include "lldb/Breakpoint/WatchpointOptions.h"
#include "lldb/Breakpoint/StoppointLocation.h"
#include "lldb/Core/UserID.h"
-#include "lldb/Symbol/ClangASTType.h"
+#include "lldb/Symbol/CompilerType.h"
#include "lldb/Target/Target.h"
namespace lldb_private {
@@ -33,23 +31,20 @@ class Watchpoint :
public StoppointLocation
{
public:
-
class WatchpointEventData :
public EventData
{
public:
+ WatchpointEventData (lldb::WatchpointEventType sub_type,
+ const lldb::WatchpointSP &new_watchpoint_sp);
+
+ ~WatchpointEventData() override;
static const ConstString &
GetFlavorString ();
- virtual const ConstString &
- GetFlavor () const;
-
- WatchpointEventData (lldb::WatchpointEventType sub_type,
- const lldb::WatchpointSP &new_watchpoint_sp);
-
- virtual
- ~WatchpointEventData();
+ const ConstString &
+ GetFlavor() const override;
lldb::WatchpointEventType
GetWatchpointEventType () const;
@@ -57,8 +52,8 @@ public:
lldb::WatchpointSP &
GetWatchpoint ();
- virtual void
- Dump (Stream *s) const;
+ void
+ Dump(Stream *s) const override;
static lldb::WatchpointEventType
GetWatchpointEventTypeFromEvent (const lldb::EventSP &event_sp);
@@ -70,15 +65,15 @@ public:
GetEventDataFromEvent (const Event *event_sp);
private:
-
lldb::WatchpointEventType m_watchpoint_event;
lldb::WatchpointSP m_new_watchpoint_sp;
DISALLOW_COPY_AND_ASSIGN (WatchpointEventData);
};
- Watchpoint (Target& target, lldb::addr_t addr, uint32_t size, const ClangASTType *type, bool hardware = true);
- ~Watchpoint ();
+ Watchpoint (Target& target, lldb::addr_t addr, uint32_t size, const CompilerType *type, bool hardware = true);
+
+ ~Watchpoint() override;
void
IncrementFalseAlarmsAndReviseHitCount();
@@ -89,11 +84,11 @@ public:
void
SetEnabled (bool enabled, bool notify = true);
- virtual bool
- IsHardware () const;
+ bool
+ IsHardware() const override;
- virtual bool
- ShouldStop (StoppointCallbackContext *context);
+ bool
+ ShouldStop(StoppointCallbackContext *context) override;
bool WatchpointRead () const;
bool WatchpointWrite () const;
@@ -110,8 +105,8 @@ public:
bool CaptureWatchedValue (const ExecutionContext &exe_ctx);
void GetDescription (Stream *s, lldb::DescriptionLevel level);
- void Dump (Stream *s) const;
- void DumpSnapshots (Stream *s, const char * prefix = NULL) const;
+ void Dump (Stream *s) const override;
+ void DumpSnapshots(Stream *s, const char *prefix = nullptr) const;
void DumpWithLevel (Stream *s, lldb::DescriptionLevel description_level) const;
Target &GetTarget() { return m_target; }
const Error &GetError() { return m_error; }
@@ -173,7 +168,7 @@ public:
///
/// @param[in] condition
/// The condition expression to evaluate when the watchpoint is hit.
- /// Pass in NULL to clear the condition.
+ /// Pass in nullptr to clear the condition.
//------------------------------------------------------------------
void SetCondition (const char *condition);
@@ -181,7 +176,7 @@ public:
/// Return a pointer to the text of the condition expression.
///
/// @return
- /// A pointer to the condition expression text, or NULL if no
+ /// A pointer to the condition expression text, or nullptr if no
// condition has been set.
//------------------------------------------------------------------
const char *GetConditionText () const;
@@ -195,13 +190,12 @@ public:
bool
IsDisabledDuringEphemeralMode();
- const ClangASTType &
- GetClangASTType()
+ const CompilerType &
+ GetCompilerType()
{
return m_type;
}
-
private:
friend class Target;
friend class WatchpointList;
@@ -240,13 +234,13 @@ private:
std::string m_watch_spec_str; // Spec for the watchpoint.
lldb::ValueObjectSP m_old_value_sp;
lldb::ValueObjectSP m_new_value_sp;
- ClangASTType m_type;
+ CompilerType m_type;
Error m_error; // An error object describing errors associated with this watchpoint.
WatchpointOptions m_options; // Settable watchpoint options, which is a delegate to handle
// the callback machinery.
bool m_being_created;
- std::unique_ptr<ClangUserExpression> m_condition_ap; // The condition to test.
+ std::unique_ptr<UserExpression> m_condition_ap; // The condition to test.
void SetID(lldb::watch_id_t id) { m_loc_id = id; }
@@ -261,4 +255,4 @@ private:
} // namespace lldb_private
-#endif // liblldb_Watchpoint_h_
+#endif // liblldb_Watchpoint_h_
diff --git a/include/lldb/Breakpoint/WatchpointOptions.h b/include/lldb/Breakpoint/WatchpointOptions.h
index 64c65f92b44f..eb08bb32e6ce 100644
--- a/include/lldb/Breakpoint/WatchpointOptions.h
+++ b/include/lldb/Breakpoint/WatchpointOptions.h
@@ -12,6 +12,9 @@
// C Includes
// C++ Includes
+#include <memory>
+#include <string>
+
// Other libraries and framework includes
// Project includes
#include "lldb/lldb-private.h"
@@ -99,7 +102,6 @@ public:
//------------------------------------------------------------------
void SetCallback (WatchpointHitCallback callback, const lldb::BatonSP &baton_sp, bool synchronous = false);
-
//------------------------------------------------------------------
/// Remove the callback from this option set.
//------------------------------------------------------------------
@@ -150,10 +152,10 @@ public:
const Baton *GetBaton () const;
//------------------------------------------------------------------
- /// Return the current thread spec for this option. This will return NULL if the no thread
+ /// Return the current thread spec for this option. This will return nullptr if the no thread
/// specifications have been set for this Option yet.
/// @return
- /// The thread specification pointer for this option, or NULL if none has
+ /// The thread specification pointer for this option, or nullptr if none has
/// been set yet.
//------------------------------------------------------------------
const ThreadSpec *
@@ -196,7 +198,6 @@ public:
StoppointCallbackContext *context,
lldb::user_id_t watch_id);
-
struct CommandData
{
CommandData () :
@@ -206,10 +207,8 @@ public:
{
}
- ~CommandData ()
- {
- }
-
+ ~CommandData() = default;
+
StringList user_source;
std::string script_source;
bool stop_on_error;
@@ -223,16 +222,14 @@ public:
{
}
- virtual
- ~CommandBaton ()
+ ~CommandBaton() override
{
delete ((CommandData *)m_data);
- m_data = NULL;
+ m_data = nullptr;
}
- virtual void
- GetDescription (Stream *s, lldb::DescriptionLevel level) const;
-
+ void
+ GetDescription(Stream *s, lldb::DescriptionLevel level) const override;
};
protected:
@@ -252,4 +249,4 @@ private:
} // namespace lldb_private
-#endif // liblldb_WatchpointOptions_h_
+#endif // liblldb_WatchpointOptions_h_