aboutsummaryrefslogtreecommitdiffstats
path: root/include/lldb/Breakpoint
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2015-07-03 16:57:06 +0000
committerEd Maste <emaste@FreeBSD.org>2015-07-03 16:57:06 +0000
commit5e95aa85bb660d45e9905ef1d7180b2678280660 (patch)
tree3c2e41c3be19b7fc7666ed45a5f91ec3b6e35f2a /include/lldb/Breakpoint
parent12bd4897ff0678fa663e09d78ebc22dd255ceb86 (diff)
downloadsrc-5e95aa85bb660d45e9905ef1d7180b2678280660.tar.gz
src-5e95aa85bb660d45e9905ef1d7180b2678280660.zip
Import LLDB as of upstream SVN 241361 (git 612c075f)vendor/lldb/lldb-r241361
Notes
Notes: svn path=/vendor/lldb/dist/; revision=285101 svn path=/vendor/lldb/lldb-r241361/; revision=285102; tag=vendor/lldb/lldb-r241361
Diffstat (limited to 'include/lldb/Breakpoint')
-rw-r--r--include/lldb/Breakpoint/Breakpoint.h58
-rw-r--r--include/lldb/Breakpoint/BreakpointLocation.h5
-rw-r--r--include/lldb/Breakpoint/BreakpointOptions.h3
-rw-r--r--include/lldb/Breakpoint/BreakpointResolverFileLine.h4
-rw-r--r--include/lldb/Breakpoint/BreakpointResolverFileRegex.h4
-rw-r--r--include/lldb/Breakpoint/BreakpointSite.h2
-rw-r--r--include/lldb/Breakpoint/Watchpoint.h18
7 files changed, 78 insertions, 16 deletions
diff --git a/include/lldb/Breakpoint/Breakpoint.h b/include/lldb/Breakpoint/Breakpoint.h
index 883571a3ce9a..a70c2787a1ef 100644
--- a/include/lldb/Breakpoint/Breakpoint.h
+++ b/include/lldb/Breakpoint/Breakpoint.h
@@ -155,6 +155,23 @@ public:
};
+ class BreakpointPrecondition
+ {
+ public:
+ virtual ~BreakpointPrecondition() {}
+
+ virtual bool
+ EvaluatePrecondition(StoppointCallbackContext &context);
+
+ virtual Error
+ ConfigurePrecondition(Args &options);
+
+ virtual void
+ DescribePrecondition(Stream &stream, lldb::DescriptionLevel level);
+ };
+
+ typedef std::shared_ptr<BreakpointPrecondition> BreakpointPreconditionSP;
+
//------------------------------------------------------------------
/// Destructor.
///
@@ -665,6 +682,31 @@ public:
}
}
+ //------------------------------------------------------------------
+ /// Set a pre-condition filter that overrides all user provided filters/callbacks etc.
+ ///
+ /// Used to define fancy breakpoints that can do dynamic hit detection without taking up the condition slot -
+ /// which really belongs to the user anyway...
+ ///
+ /// The Precondition should not continue the target, it should return true if the condition says to stop and
+ /// false otherwise.
+ ///
+ //------------------------------------------------------------------
+ void
+ SetPrecondition(BreakpointPreconditionSP precondition_sp)
+ {
+ m_precondition_sp = precondition_sp;
+ }
+
+ bool
+ EvaluatePrecondition (StoppointCallbackContext &context);
+
+ BreakpointPreconditionSP
+ GetPrecondition()
+ {
+ return m_precondition_sp;
+ }
+
protected:
friend class Target;
//------------------------------------------------------------------
@@ -737,13 +779,17 @@ private:
// For Breakpoint only
//------------------------------------------------------------------
bool m_being_created;
- bool m_hardware; // If this breakpoint is required to use a hardware breakpoint
- Target &m_target; // The target that holds this breakpoint.
+ bool m_hardware; // If this breakpoint is required to use a hardware breakpoint
+ Target &m_target; // The target that holds this breakpoint.
std::unordered_set<std::string> m_name_list; // If not empty, this is the name of this breakpoint (many breakpoints can share the same name.)
- lldb::SearchFilterSP m_filter_sp; // The filter that constrains the breakpoint's domain.
- lldb::BreakpointResolverSP m_resolver_sp; // The resolver that defines this breakpoint.
- BreakpointOptions m_options; // Settable breakpoint options
- BreakpointLocationList m_locations; // The list of locations currently found for this breakpoint.
+ lldb::SearchFilterSP m_filter_sp; // The filter that constrains the breakpoint's domain.
+ lldb::BreakpointResolverSP m_resolver_sp; // The resolver that defines this breakpoint.
+ BreakpointPreconditionSP m_precondition_sp; // The precondition is a breakpoint-level hit filter that can be used
+ // to skip certain breakpoint hits. For instance, exception breakpoints
+ // use this to limit the stop to certain exception classes, while leaving
+ // the condition & callback free for user specification.
+ BreakpointOptions m_options; // Settable breakpoint options
+ BreakpointLocationList m_locations; // The list of locations currently found for this breakpoint.
std::string m_kind_description;
bool m_resolve_indirect_symbols;
uint32_t m_hit_count; // Number of times this breakpoint/watchpoint has been hit. This is kept
diff --git a/include/lldb/Breakpoint/BreakpointLocation.h b/include/lldb/Breakpoint/BreakpointLocation.h
index 642256386785..c3e620d085c6 100644
--- a/include/lldb/Breakpoint/BreakpointLocation.h
+++ b/include/lldb/Breakpoint/BreakpointLocation.h
@@ -21,11 +21,8 @@
#include "lldb/lldb-private.h"
#include "lldb/Breakpoint/StoppointLocation.h"
#include "lldb/Core/Address.h"
-#include "lldb/Core/StringList.h"
#include "lldb/Core/UserID.h"
#include "lldb/Host/Mutex.h"
-#include "lldb/Target/Process.h"
-#include "lldb/Expression/ClangUserExpression.h"
namespace lldb_private {
@@ -464,7 +461,7 @@ private:
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.
lldb::BreakpointSiteSP m_bp_site_sp; ///< Our breakpoint site (it may be shared by more than one location.)
- ClangUserExpression::ClangUserExpressionSP m_user_expression_sp; ///< The compiled expression to use in testing our condition.
+ lldb::ClangUserExpressionSP 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.
diff --git a/include/lldb/Breakpoint/BreakpointOptions.h b/include/lldb/Breakpoint/BreakpointOptions.h
index eb374ad69603..bf10fc096d75 100644
--- a/include/lldb/Breakpoint/BreakpointOptions.h
+++ b/include/lldb/Breakpoint/BreakpointOptions.h
@@ -89,6 +89,9 @@ public:
// callback.
// Asynchronous callbacks get run as part of the "ShouldStop" logic in the thread plan. The logic there is:
// a) If the breakpoint is thread specific and not for this thread, continue w/o running the callback.
+ // NB. This is actually enforced underneath the breakpoint system, the Process plugin is expected to
+ // call BreakpointSite::IsValidForThread, and set the thread's StopInfo to "no reason". That way,
+ // thread displays won't show stops for breakpoints not for that thread...
// b) If the ignore count says we shouldn't stop, then ditto.
// c) If the condition says we shouldn't stop, then ditto.
// d) Otherwise, the callback will get run, and if it returns true we will stop, and if false we won't.
diff --git a/include/lldb/Breakpoint/BreakpointResolverFileLine.h b/include/lldb/Breakpoint/BreakpointResolverFileLine.h
index cd62bcd032b0..2403d24515a7 100644
--- a/include/lldb/Breakpoint/BreakpointResolverFileLine.h
+++ b/include/lldb/Breakpoint/BreakpointResolverFileLine.h
@@ -32,7 +32,8 @@ public:
const FileSpec &resolver,
uint32_t line_no,
bool check_inlines,
- bool skip_prologue);
+ bool skip_prologue,
+ bool exact_match);
virtual
~BreakpointResolverFileLine ();
@@ -67,6 +68,7 @@ protected:
uint32_t m_line_number; // This is the line number that we are looking for.
bool m_inlines; // This determines whether the resolver looks for inlined functions or not.
bool m_skip_prologue;
+ bool m_exact_match;
private:
DISALLOW_COPY_AND_ASSIGN(BreakpointResolverFileLine);
diff --git a/include/lldb/Breakpoint/BreakpointResolverFileRegex.h b/include/lldb/Breakpoint/BreakpointResolverFileRegex.h
index 2c05ac1c87da..8e18fff16447 100644
--- a/include/lldb/Breakpoint/BreakpointResolverFileRegex.h
+++ b/include/lldb/Breakpoint/BreakpointResolverFileRegex.h
@@ -29,7 +29,8 @@ class BreakpointResolverFileRegex :
{
public:
BreakpointResolverFileRegex (Breakpoint *bkpt,
- RegularExpression &regex);
+ RegularExpression &regex,
+ bool exact_match);
virtual
~BreakpointResolverFileRegex ();
@@ -61,6 +62,7 @@ public:
protected:
friend class Breakpoint;
RegularExpression m_regex; // This is the line expression that we are looking for.
+ bool m_exact_match;
private:
DISALLOW_COPY_AND_ASSIGN(BreakpointResolverFileRegex);
diff --git a/include/lldb/Breakpoint/BreakpointSite.h b/include/lldb/Breakpoint/BreakpointSite.h
index c6dbef781f22..d67fc8bb57f1 100644
--- a/include/lldb/Breakpoint/BreakpointSite.h
+++ b/include/lldb/Breakpoint/BreakpointSite.h
@@ -18,7 +18,7 @@
// Other libraries and framework includes
// Project includes
-#include "lldb/lldb-private.h"
+#include "lldb/lldb-forward.h"
#include "lldb/Host/Mutex.h"
#include "lldb/Core/UserID.h"
#include "lldb/Breakpoint/StoppointLocation.h"
diff --git a/include/lldb/Breakpoint/Watchpoint.h b/include/lldb/Breakpoint/Watchpoint.h
index 8493775eec34..926e0b506f31 100644
--- a/include/lldb/Breakpoint/Watchpoint.h
+++ b/include/lldb/Breakpoint/Watchpoint.h
@@ -20,10 +20,11 @@
// Project includes
#include "lldb/lldb-private.h"
-#include "lldb/Target/Target.h"
-#include "lldb/Core/UserID.h"
#include "lldb/Breakpoint/WatchpointOptions.h"
#include "lldb/Breakpoint/StoppointLocation.h"
+#include "lldb/Core/UserID.h"
+#include "lldb/Symbol/ClangASTType.h"
+#include "lldb/Target/Target.h"
namespace lldb_private {
@@ -205,7 +206,18 @@ private:
friend class Target;
friend class WatchpointList;
- void ResetHitCount() { m_hit_count = 0; }
+ void
+ ResetHitCount ()
+ {
+ m_hit_count = 0;
+ }
+
+ void
+ ResetHistoricValues ()
+ {
+ m_old_value_sp.reset(nullptr);
+ m_new_value_sp.reset(nullptr);
+ }
Target &m_target;
bool m_enabled; // Is this watchpoint enabled