Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to convert TimeTravel recorded session to some human readable format #119

Open
Swiftly1 opened this issue Feb 19, 2025 · 1 comment
Open

Comments

@Swiftly1
Copy link

Swiftly1 commented Feb 19, 2025

Hi,

I'm not sure if this is the right place to ask, but

How can I convert the recording files into some human readable format?

I've got those files:


-a---- 19.02.2025 20:08 33292288 ConsoleApplication101.idx
-a---- 19.02.2025 20:07 2330 ConsoleApplication101.out
-a---- 19.02.2025 20:07 25165824 ConsoleApplication101.run

For example I'd want to convert it into json

and then I'd extract functions visited and how the locals changed when function was executing

Or maybe I should interact with DebugEngine somehow in order to go thru events 1-by-1?

Thanks in advance

@KenSykes
Copy link
Contributor

KenSykes commented Mar 6, 2025

Today you need to use the debugger interfaces to extract information from the trace. You will want to look at https://learn.microsoft.com/en-us/windows-hardware/drivers/debuggercmds/time-travel-debugging-calls-objects and https://learn.microsoft.com/en-us/windows-hardware/drivers/debuggercmds/time-travel-debugging-memory-objects to get call and memory access information, respectively. These are the fastest way to extract the information. You can write Javascript code to call these and process the results. You can also navigate to the corresponding positions in the trace using .SwitchTo() on the returned positions and do further investigation. If you do lots of position navigations the performance will get slow, it is a full seek / synchronization with the debugger engine each time.

You can also write a debugger extension and talk to the debugger interfaces directly https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/client-com-interfaces, and/or the C++ data model library to make it easy to access .Calls() / .Memory() mentioned above from a C++ debugger extension. https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/data-model-cpp-overview#-using-the-dbgmodelclientex-library

Converting all events to JSON is not practical: a 2GHz computer is capable of executing ~2 billion instructions / second, each of which is an event.

Hope this helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants