DkmBoundBreakpoint Class

Definition

Represents a breakpoint which has been bound (resolved) to a particular code instruction address or a particular data element. For example, in C++ templates one could create a DkmPendingBreakpoint for a source line. The breakpoint manager would resolve it to zero (ex: module not loaded), one (ex: template is only used on 'int') or many (ex: template is used with many template arguments) location. Each location would have a DkmBoundBreakpoint object.

public ref class DkmBoundBreakpoint : Microsoft::VisualStudio::Debugger::DkmDataContainer, IDisposable
[System.Runtime.InteropServices.Guid("91c8952c-4e18-00f7-ac71-8d0d38694e4c")]
public class DkmBoundBreakpoint : Microsoft.VisualStudio.Debugger.DkmDataContainer, IDisposable
[<System.Runtime.InteropServices.Guid("91c8952c-4e18-00f7-ac71-8d0d38694e4c")>]
type DkmBoundBreakpoint = class
    inherit DkmDataContainer
    interface IDisposable
Public Class DkmBoundBreakpoint
Inherits DkmDataContainer
Implements IDisposable
Inheritance
Attributes
Implements

Properties

CompilerId

Identifies the source language (ex: C#) and compiler vendor (ex: Microsoft) that the breakpoint should bind against. 'LanguageId' may be left as Guid.Empty to indicate that the breakpoint should bind against all languages. 'VendorId' is nearly always left as Guid.Empty, which indicates that only the language is known (not the compiler).

IsUnloaded

Returns true if a 'unloaded' event has been raised for this object (example: DkmThread::Unload is called) or if the object has been closed. Note that care must be used when checking this status as, without synchronization, the returned status may no longer be accurate the instruction after it is read.

(Inherited from DkmDataContainer)
PendingBreakpoint

High level breakpoint object which is tied to a user-level construct (ex: source file, function name) which may map to zero or more code-level constructs (DkmBoundBreakpoint) and which may be tracked over time.

Process

DkmProcess represents a target process which is being debugged. The debugger debugs processes, so this is the basic unit of debugging. A DkmProcess can represent a system process or a virtual process such as minidumps.

SourceId

Identifies the source of an object. SourceIds are used to enable filtering in scenarios when multiple components may be creating instances of a class. For example, source ids can be used to determine if a breakpoint comes from the AD7 AL (ex: user breakpoint, or other breakpoint visible at the SDM level) instead of a breakpoint which may be created by another component (for example an internal breakpoint used for stepping).

SourcePosition

[Optional] An optional reference to the document and text position this breakpoint bound to. This should be set unless the bound location does not have source information.

Target

[Optional] The low-level runtime breakpoint which backs this high-level bound breakpoint.

UniqueId

Guid which uniquely identifies this bound breakpoint object.

Methods

Close()

Closes the bound breakpoint. This is done by breakpoint manager.

DkmBoundBreakpoint objects are automatically closed when their associated DkmPendingBreakpoint object is closed.

Create(DkmPendingBreakpoint, DkmRuntimeBreakpoint, DkmSourcePosition, DkmDataItem)

Called by a breakpoint manager to create a DkmBoundBreakpoint object for each location that a DkmPendingBreakpoint binds to.

Disable(DkmWorkList, DkmCompletionRoutine<DkmDisableBoundBreakpointAsyncResult>)

Disable the bound breakpoint so that it will no longer hit. If the bound breakpoint is already disabled, this operation has no effect.

This method will append a new work item to the specified work list, and return once the work item has been appended. The actual processing of the work item is asynchronous. The caller will be notified that the request is complete through the completion routine.

Location constraint: API must be called from an IDE component (component level > 100,000).

Enable(DkmWorkList, DkmCompletionRoutine<DkmEnableBoundBreakpointAsyncResult>)

Enables the bound breakpoint so that it can be hit. If the bound breakpoint is already enabled, this operation has no effect.

This method will append a new work item to the specified work list, and return once the work item has been appended. The actual processing of the work item is asynchronous. The caller will be notified that the request is complete through the completion routine.

Location constraint: API must be called from an IDE component (component level > 100,000).

GetDataItem<T>()

Gets the instance of 'T' which has been added to this container instance. If this container does not contain a 'T', this function will return null.

(Inherited from DkmDataContainer)
GetHitCountValue(DkmWorkList, DkmCompletionRoutine<DkmGetBoundBreakpointHitCountValueAsyncResult>)

Returns the number of times that a bound breakpoint has been hit. This value should not include any times when the breakpoint's instruction was executed, but the breakpoint's condition indicated that the debugger should not stop.

This method will append a new work item to the specified work list, and return once the work item has been appended. The actual processing of the work item is asynchronous. The caller will be notified that the request is complete through the completion routine.

Location constraint: API must be called from an IDE component (component level > 100,000).

IsEnabled()

Query to determine if the bound breakpoint is enabled.

Location constraint: API must be called from an IDE component (component level > 100,000).

OnDataBreakpointHit(DkmThread, Boolean, String)

Raise a DataBreakpointHit event. Components which implement the event sink interface will receive the event notification. This method will enqueue the event and control will immediately return to the caller.

This API was introduced in Visual Studio 16 RTM (DkmApiVersion.VS16RTM).

OnHit(DkmThread, Boolean)

Raise a BoundBreakpointHit event. Components which implement the event sink interface will receive the event notification. This method will enqueue the event and control will immediately return to the caller.

This method may only be called by the component which created the object.

RemoveDataItem<T>()

Remove the instance of 'T' from this container. It is usually unnecessary to call this method as a data container will automatically be emptied when the object is closed.

(Inherited from DkmDataContainer)
SetCondition(DkmBreakpointCondition)

Initialize or update or clear the condition on a breakpoint. If the same breakpoint has both a language-level condition, and a hit count condition, the language-level condition is applied first.

Location constraint: API must be called from an IDE component (component level > 100,000).

SetDataItem<T>(DkmDataCreationDisposition, T)

Place a new item in the data container.

(Inherited from DkmDataContainer)
SetHitCountCondition(DkmBreakpointHitCountCondition)

Initialize, update or clear the hit count condition on a breakpoint. If the same breakpoint has both a language-level condition, and a hit count condition, the language-level condition is applied first.

Location constraint: API must be called from an IDE component (component level > 100,000).

SetHitCountValue(Int32)

Modifies the value for a breakpoint hit count.

Location constraint: API must be called from an IDE component (component level > 100,000).

Explicit Interface Implementations

IDisposable.Dispose()

Applies to