This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // decypher the callback details | |
| val = GetFieldValue(heap, currentTimerQueueTimerRef, "m_timerCallback"); | |
| if (val != null) | |
| { | |
| ulong elementAddress = (ulong)val; | |
| if (elementAddress == 0) | |
| continue; | |
| var elementType = _heap.GetObjectType(elementAddress); | |
| if (elementType != null) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private string BuildTimerCallbackMethodName(ClrRuntime runtime, ulong timerCallbackRef) | |
| { | |
| var heap = runtime.GetHeap(); | |
| var methodPtr = GetFieldValue(heap, timerCallbackRef, "_methodPtr"); | |
| if (methodPtr != null) | |
| { | |
| ClrMethod method = runtime.GetMethodByAddress((ulong)(long)methodPtr); | |
| if (method != null) | |
| { | |
| // figure out the real callback implementor type thanks to _target |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private static ulong GetTaskStateFromAddress(ulong address) | |
| { | |
| var type = Runtime.GetHeap().GetObjectType(address); | |
| if ((type != null) && (type.Name.StartsWith("System.Threading.Task"))) | |
| { | |
| // try to get the m_stateFlags field value | |
| ClrInstanceField field = type.GetFieldByName("m_stateFlags"); | |
| if (field != null) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private static string GetTaskState(ulong flag) | |
| { | |
| TaskStatus rval; | |
| if ((flag & TASK_STATE_FAULTED) != 0) rval = TaskStatus.Faulted; | |
| else if ((flag & TASK_STATE_CANCELED) != 0) rval = TaskStatus.Canceled; | |
| else if ((flag & TASK_STATE_RAN_TO_COMPLETION) != 0) rval = TaskStatus.RanToCompletion; | |
| else if ((flag & TASK_STATE_WAITING_ON_CHILDREN) != 0) rval = TaskStatus.WaitingForChildrenToComplete; | |
| else if ((flag & TASK_STATE_DELEGATE_INVOKED) != 0) rval = TaskStatus.Running; | |
| else if ((flag & TASK_STATE_STARTED) != 0) rval = TaskStatus.WaitingToRun; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static void MyCommand(IntPtr client, [MarshalAs(UnmanagedType.LPStr)] string args) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Must be the first thing in our extension. | |
| if (!InitApi(client)) | |
| return; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public partial class DebuggerExtensions | |
| { | |
| public static IDebugClient DebugClient { get; private set; } | |
| public static DataTarget DataTarget { get; private set; } | |
| public static ClrRuntime Runtime { get; private set; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [DllExport("tks")] | |
| public static void tks(IntPtr client, [MarshalAs(UnmanagedType.LPStr)] string args) | |
| { | |
| OnTkState(client, args); | |
| } | |
| [DllExport("tkstate")] | |
| public static void tkstate(IntPtr client, [MarshalAs(UnmanagedType.LPStr)] string args) | |
| { | |
| OnTkState (client, args); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public partial class DebuggerExtensions | |
| { | |
| [DllExport("Help")] | |
| public static void Help(IntPtr client, [MarshalAs(UnmanagedType.LPStr)] string args) | |
| { | |
| OnHelp(client, args); | |
| } | |
| [DllExport("help")] | |
| public static void help(IntPtr client, [MarshalAs(UnmanagedType.LPStr)] string args) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @inproceedings{DiemertMeynet2017, | |
| author = {{Diemert Eustache, Meynet Julien} and Galland, Pierre and Lefortier, Damien}, | |
| title={Attribution Modeling Increases Efficiency of Bidding in Display Advertising}, | |
| publisher = {ACM}, | |
| pages={To appear}, | |
| booktitle = {Proceedings of the AdKDD and TargetAd Workshop, KDD, Halifax, NS, Canada, August, 14, 2017}, | |
| year = {2017} | |
| } |