本文整理汇总了C#中Results.FindString方法的典型用法代码示例。如果您正苦于以下问题:C# Results.FindString方法的具体用法?C# Results.FindString怎么用?C# Results.FindString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Results
的用法示例。
在下文中一共展示了Results.FindString方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: EvalBindWatchResult
private static BindResult EvalBindWatchResult(Results bindResult, AD7PendingBreakpoint pbreak, string address, uint size)
{
string errormsg = "Unknown error";
if (bindResult.ResultClass == ResultClass.error)
{
if (bindResult.Contains("msg"))
{
errormsg = bindResult.FindString("msg");
}
if (String.IsNullOrWhiteSpace(errormsg))
{
errormsg = "Unknown error";
}
return new BindResult(errormsg);
}
else if (bindResult.ResultClass != ResultClass.done)
{
return new BindResult(errormsg);
}
TupleValue bkpt = null;
if (bindResult.Contains("wpt"))
{
ResultValue b = bindResult.Find("wpt");
if (b is TupleValue)
{
bkpt = b as TupleValue;
}
}
else
{
return new BindResult(errormsg);
}
string number = bkpt.FindString("number");
PendingBreakpoint bp = new PendingBreakpoint(pbreak, number, MIBreakpointState.Single);
BoundBreakpoint bbp = new BoundBreakpoint(bp, MICore.Debugger.ParseAddr(address), size);
return new BindResult(bp, bbp);
}
示例2: EvalBindResult
private static BindResult EvalBindResult(Results bindResult, AD7PendingBreakpoint pbreak)
{
string errormsg = "Unknown error";
if (bindResult.ResultClass == ResultClass.error)
{
if (bindResult.Contains("msg"))
{
errormsg = bindResult.FindString("msg");
}
if (String.IsNullOrWhiteSpace(errormsg))
{
errormsg = "Unknown error";
}
return new BindResult(errormsg);
}
else if (bindResult.ResultClass != ResultClass.done)
{
return new BindResult(errormsg);
}
TupleValue bkpt = null;
ValueListValue list = null;
if (bindResult.Contains("bkpt"))
{
ResultValue b = bindResult.Find("bkpt");
if (b is TupleValue)
{
bkpt = b as TupleValue;
}
else if (b is ValueListValue)
{
// "<MULTIPLE>" sometimes includes a list of bound breakpoints
list = b as ValueListValue;
bkpt = list.Content[0] as TupleValue;
}
}
else
{
// If the source file is not found, "done" is the result without a binding
// (the error is sent via an "&" string and hence lost)
return new BindResult(errormsg);
}
Debug.Assert(bkpt.FindString("type") == "breakpoint");
string number = bkpt.FindString("number");
string addr = bkpt.TryFindString("addr");
PendingBreakpoint bp = new PendingBreakpoint(pbreak, number, StringToBreakpointState(addr));
if (list == null) // single breakpoint
{
BoundBreakpoint bbp = bp.GetBoundBreakpoint(bkpt);
if (bbp == null)
{
return new BindResult(bp, MICoreResources.Status_BreakpointPending);
}
return new BindResult(bp, bbp);
}
else // <MULTIPLE> with list of addresses
{
BindResult res = new BindResult(bp);
for (int i = 1; i < list.Content.Length; ++i)
{
BoundBreakpoint bbp = bp.GetBoundBreakpoint(list.Content[i] as TupleValue);
res.BoundBreakpoints.Add(bbp);
}
return res;
}
}
示例3: DecodeExceptionReceivedProperties
public override void DecodeExceptionReceivedProperties(Results miExceptionResult, out Guid? exceptionCategory, out ExceptionBreakpointState state)
{
string category = miExceptionResult.FindString("exception-category");
if (category == "mda")
{
exceptionCategory = s_exceptionCategory_MDA;
}
else
{
Debug.Assert(category == "clr");
exceptionCategory = s_exceptionCategory_CLR;
}
string stage = miExceptionResult.FindString("exception-stage");
switch (stage)
{
case "throw":
state = ExceptionBreakpointState.BreakThrown;
break;
case "user-unhandled":
state = ExceptionBreakpointState.BreakUserHandled;
break;
case "unhandled":
state = ExceptionBreakpointState.None;
break;
default:
Debug.Fail("Unknown exception-stage value");
state = ExceptionBreakpointState.None;
break;
}
}
示例4: OnComplete
internal void OnComplete(Results results, MICommandFactory commandFactory)
{
if (_expectedResultClass != ResultClass.None && _expectedResultClass != results.ResultClass)
{
string miError = null;
if (results.ResultClass == ResultClass.error)
{
miError = results.FindString("msg");
}
_completionSource.SetException(new UnexpectedMIResultException(commandFactory.Name, this.Command, miError));
}
else
{
_completionSource.SetResult(results);
}
}
示例5: HandleThreadGroupStarted
private void HandleThreadGroupStarted(Results results)
{
string threadGroupId = results.FindString("id");
string pidString = results.FindString("pid");
int pid = Int32.Parse(pidString, CultureInfo.InvariantCulture);
// Ignore pid 0 due to spurious thread group created event on iOS (lldb).
// On android the scheduler runs as pid 0, but that process cannot currently be debugged anyway.
if (pid != 0)
{
lock (_debuggeePids)
{
_debuggeePids.Add(threadGroupId, pid);
}
}
}
示例6: HandleThreadGroupStarted
private void HandleThreadGroupStarted(Results results)
{
string idString = results.FindString("id");
string pidString = results.FindString("pid");
lock (_debuggeePids)
{
_debuggeePids.Add(idString, Int32.Parse(pidString, CultureInfo.InvariantCulture));
}
}
示例7: ThreadCreatedEvent
public void ThreadCreatedEvent(Results evnt)
{
int tid = evnt.FindInt("id");
string groupId = evnt.FindString("group-id");
int pid = _process.PidByInferior(groupId);
foreach (var p in _threadStates)
{
if (p.Value.Newpid == pid)
{
p.Value.Newtid = tid;
}
}
}