本文整理汇总了C#中Process.GetBacktrace方法的典型用法代码示例。如果您正苦于以下问题:C# Process.GetBacktrace方法的具体用法?C# Process.GetBacktrace怎么用?C# Process.GetBacktrace使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Process
的用法示例。
在下文中一共展示了Process.GetBacktrace方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UpdateThread
void UpdateThread(Process thread)
{
TreeRowReference row = (TreeRowReference)thread_rows[thread];
TreeIter iter;
if (row != null && store.GetIter (out iter, row.Path)) {
store.SetValue (iter, 0, thread.ID);
store.SetValue (iter, 1, thread.PID);
store.SetValue (iter, 2, thread.State.ToString());
string location;
if (thread.IsStopped)
location = thread.GetBacktrace().Frames[0].SourceAddress.Name;
else
location = "";
store.SetValue (iter, 3, location);
}
else {
AddThread (thread);
}
}
示例2: AddThread
void AddThread(Process thread)
{
TreeIter iter;
store.Append (out iter);
store.SetValue (iter, 0, new GLib.Value (thread.ID));
store.SetValue (iter, 1, new GLib.Value (thread.PID));
store.SetValue (iter, 2, new GLib.Value (thread.State.ToString()));
if (thread.IsStopped)
store.SetValue (iter, 3, new GLib.Value (thread.GetBacktrace().Frames[0].SourceAddress.Name));
else
store.SetValue (iter, 3, new GLib.Value (""));
thread_rows.Add (thread, new TreeRowReference (store, store.GetPath (iter)));
}