本文整理汇总了C#中Mono.Debugging.Client.BreakEvent类的典型用法代码示例。如果您正苦于以下问题:C# BreakEvent类的具体用法?C# BreakEvent怎么用?C# BreakEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BreakEvent类属于Mono.Debugging.Client命名空间,在下文中一共展示了BreakEvent类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CopyFrom
public override void CopyFrom (BreakEvent ev)
{
base.CopyFrom (ev);
FunctionBreakpoint bp = (FunctionBreakpoint) ev;
FunctionName = bp.FunctionName;
}
示例2: CopyFrom
public override void CopyFrom (BreakEvent ev)
{
base.CopyFrom (ev);
Catchpoint cp = (Catchpoint) ev;
exceptionName = cp.exceptionName;
includeSubclasses = cp.includeSubclasses;
}
示例3: AttachSession
internal void AttachSession (DebuggerSession s, BreakEvent ev)
{
session = s;
BreakEvent = ev;
session.NotifyBreakEventStatusChanged (BreakEvent);
if (adjustedLine != -1)
session.AdjustBreakpointLocation ((Breakpoint)BreakEvent, adjustedLine);
}
示例4: CopyFrom
public override void CopyFrom (BreakEvent ev)
{
base.CopyFrom (ev);
Breakpoint bp = (Breakpoint) ev;
breakIfConditionChanges = bp.breakIfConditionChanges;
conditionExpression = bp.conditionExpression;
fileName = bp.fileName;
column = bp.column;
line = bp.line;
}
示例5: OnInsertBreakEvent
protected override object OnInsertBreakEvent (BreakEvent be, bool activate)
{
lock (documents) {
Breakpoint bp = be as Breakpoint;
if (bp != null) {
DocInfo doc;
if (!documents.TryGetValue (System.IO.Path.GetFullPath (bp.FileName), out doc))
return null;
int line;
try {
line = doc.Document.FindClosestLine(bp.Line);
}
catch {
// Invalid line
return null;
}
ISymbolMethod met = doc.Reader.GetMethodFromDocumentPosition (doc.Document, line, 0);
if (met == null)
return null;
int offset = -1;
foreach (SequencePoint sp in met.GetSequencePoints ()) {
if (sp.Line == line && sp.Document.URL == doc.Document.URL) {
offset = sp.Offset;
break;
}
}
if (offset == -1)
return null;
CorFunction func = doc.Module.GetFunctionFromToken (met.Token.GetToken ());
CorFunctionBreakpoint corBp = func.ILCode.CreateBreakpoint (offset);
corBp.Activate (activate);
return corBp;
}
}
return null;
}
示例6: GetBreakInfo
BreakInfo GetBreakInfo (BreakEvent be)
{
object bi;
if (GetBreakpointHandle (be, out bi))
return (BreakInfo) bi;
else
return null;
}
示例7: BreakpointPropertiesDialog
public BreakpointPropertiesDialog (BreakEvent be, BreakpointType breakpointType)
{
this.be = be;
LoadExceptionList ();
Initialize ();
SetInitialData ();
SetLayout ();
if (be == null) {
switch (breakpointType) {
case BreakpointType.Location:
stopOnLocation.Active = true;
entryLocationFile.SetFocus ();
break;
case BreakpointType.Function:
stopOnFunction.Active = true;
entryFunctionName.SetFocus ();
break;
case BreakpointType.Catchpoint:
stopOnException.Active = true;
entryExceptionType.SetFocus ();
break;
}
}
}
示例8: UpdateBreakEvent
void UpdateBreakEvent (BreakEvent be)
{
lock (breakpoints) {
BreakEventInfo binfo;
if (breakpoints.TryGetValue (be, out binfo))
OnUpdateBreakEvent (binfo);
}
}
示例9: RemoveBreakEvent
bool RemoveBreakEvent (BreakEvent be)
{
lock (breakpoints) {
BreakEventInfo binfo;
if (breakpoints.TryGetValue (be, out binfo)) {
try {
OnRemoveBreakEvent (binfo);
} catch (Exception ex) {
if (started)
OnDebuggerOutput (false, ex.Message);
HandleException (ex);
return false;
}
breakpoints.Remove (be);
}
return true;
}
}
示例10: OnUpdateBreakEvent
protected override object OnUpdateBreakEvent (object handle, BreakEvent be)
{
return controller.DebuggerServer.UpdateBreakEvent (handle, be);
}
示例11: OnInsertBreakEvent
//breakpoints etc
// returns a handle
protected override object OnInsertBreakEvent (BreakEvent be, bool activate)
{
return controller.DebuggerServer.InsertBreakEvent (be, activate);
}
示例12: OnInsertBreakEvent
protected override BreakEventInfo OnInsertBreakEvent(BreakEvent be)
{
LogWriter(false, "Break inserted\n");
Breakpoint bp = be as Breakpoint;
if (bp == null)
throw new NotSupportedException ();
BreakEventInfo bi = new BreakEventInfo ();
//lock (debuggerLock) {
LogWriter(false, "Location is " + PathHelper.CutOffClassPath(classPathes, bp.FileName) + ":" + bp.Line + '\n');
breaks.Add (new Break (PathHelper.CutOffClassPath (classPathes, bp.FileName), bp.Line));
//}
//bi.Handle = TODO: add returned success value (break count etc)
bi.SetStatus (BreakEventStatus.Bound, null);
return bi;
}
示例13: GetBreakpointHandle
protected bool GetBreakpointHandle (BreakEvent be, out object handle)
{
BreakEventInfo binfo;
if (!breakpoints.TryGetValue (be, out binfo)) {
handle = null;
return false;
}
handle = binfo.Handle;
return true;
}
示例14: UpdateBreakEvent
void UpdateBreakEvent (BreakEvent be)
{
lock (breakpoints) {
object handle;
if (GetBreakpointHandle (be, out handle)) {
if (handle != null) {
object newHandle = OnUpdateBreakEvent (handle, be);
if (newHandle != handle && (newHandle == null || !newHandle.Equals (handle))) {
// Update the handle if it has changed, and notify the status change
SetBreakEventHandle (be, newHandle);
}
Breakpoints.NotifyStatusChanged (be);
} else {
// Try inserting the breakpoint again
try {
handle = OnInsertBreakEvent (be, be.Enabled);
if (handle != null) {
// This time worked
SetBreakEventHandle (be, handle);
Breakpoints.NotifyStatusChanged (be);
}
} catch (Exception ex) {
Breakpoint bp = be as Breakpoint;
if (bp != null)
OnDebuggerOutput (false, "Could not set breakpoint at location '" + bp.FileName + ":" + bp.Line + " (" + ex.Message + ")\n");
else
OnDebuggerOutput (false, "Could not set catchpoint for exception '" + ((Catchpoint)be).ExceptionName + "' (" + ex.Message + ")\n");
HandleException (ex);
}
}
}
}
}
示例15: UpdateBreakEventStatus
void UpdateBreakEventStatus (BreakEvent be)
{
lock (breakpoints) {
object handle;
if (GetBreakpointHandle (be, out handle) && handle != null) {
try {
OnEnableBreakEvent (handle, be.Enabled);
} catch (Exception ex) {
if (started)
OnDebuggerOutput (false, ex.Message);
HandleException (ex);
}
}
}
}