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

Introduced dump to trace #3098

Open
wants to merge 30 commits into
base: development
Choose a base branch
from

Conversation

torusrxxx
Copy link
Member

This fixes #2378
There's obviously a lot more to do. This pull request is here only for those who desperately want to dump from a trace or want to become alpha testers.
Right click on an instruction in the trace, and click the "Information" menu to get full dump of the trace up to the selected instruction into the log view.

@torusrxxx torusrxxx force-pushed the patch000000dc branch 2 times, most recently from cebbd21 to 6d182cb Compare June 11, 2023 04:20
@torusrxxx
Copy link
Member Author

The trace dump index is working and tested on a 136MB huge trace.
Speed is lightening. Search constant takes 10 seconds and memory reference search takes 46ms. When memory reference search is used for the first time it takes 17s including reading the trace file and building the index.
Memory usage is moderate. It saves a record in trace for every byte, so memory usage could be improved by saving a record for every dword instead. This is more complex due to special treatment needed for unaligned memory access. Currently it uses about 567MB for the 136MB test trace, may be acceptable.
Next step will be the GUI part.

@mrexodia
Copy link
Member

Would you like this to be merged into development or will you continue development on this branch? Currently the format checks are failing, so merging is blocked...

@torusrxxx
Copy link
Member Author

I think those new files are already formatted, no idea why appveyor doesn't like that. I'll pause development for a while, but I don't think this feature is completed. The aim of this pull request is to bring in dump and stack windows, not to merely accelerate memory reference search. Of course I support merging it if you think merging this would allow other people to use this feature and contribute to it. Possibly disable the debug feature of dumping the trace memory in log view when clicking on "information" menu, it should be available in the dump tab instead.

@torusrxxx torusrxxx force-pushed the patch000000dc branch 2 times, most recently from 42d600b to 37e4416 Compare July 17, 2023 09:09
@torusrxxx torusrxxx force-pushed the patch000000dc branch 2 times, most recently from 8d6f503 to 6f551fc Compare July 27, 2023 09:34
@torusrxxx
Copy link
Member Author

Dump widget has been added to trace, now it looks almost like the CPU view. There are still tons of usability problems and random crashes.

@torusrxxx torusrxxx force-pushed the patch000000dc branch 2 times, most recently from 52a6d98 to 7a6c225 Compare August 27, 2023 03:45
@torusrxxx torusrxxx marked this pull request as draft August 27, 2023 03:59
@mrexodia
Copy link
Member

It looks like this is conflicting with the changes in #3192 a bit. I will try to properly refactor the HexDump to take an AbstractMemoryPage with pure virtual read/write functions, since this will be useful for other projects as well.

@mrexodia
Copy link
Member

The following files are causing the formatting checks error btw:

src/gui/Src/Tracer/TraceDump.cpp
src/gui/Src/Tracer/TraceDump.h
src/gui/Src/Tracer/TraceFileDump.cpp
src/gui/Src/Tracer/TraceFileDump.h

Might be CRLF vs LF?

@AppVeyorBot
Copy link

Download x64dbg 1.0.1711 (commit ab2a69cd13 by @torusrxxx)

@AppVeyorBot
Copy link

Download x64dbg 1.0.1725 (commit 3d0e2654a9 by @torusrxxx)

@torusrxxx
Copy link
Member Author

Maybe refactor HexDump first, and then we continue from that?

@AppVeyorBot
Copy link

Download x64dbg 1.0.1726 (commit f02671aeb3 by @torusrxxx)

@AppVeyorBot
Copy link

Download x64dbg 1.0.1765 (commit ca0b06d70a by @torusrxxx)

@AppVeyorBot
Copy link

Download x64dbg 1.0.1766 (commit 517b1ec646 by @torusrxxx)

@AppVeyorBot
Copy link

Download x64dbg 1.0.1778 (commit 1ea8ab91d9 by @torusrxxx)

@torusrxxx torusrxxx marked this pull request as ready for review October 7, 2023 09:03
@torusrxxx
Copy link
Member Author

DisableTraceDump setting has been added, it shouldn't break things horribly now.

@AppVeyorBot
Copy link

Download x64dbg 1.0.1779 (commit 46c7849fee by @torusrxxx)

@AppVeyorBot
Copy link

Download x64dbg 1.0.1784 (commit ae0467f80a by @torusrxxx)

@mrexodia
Copy link
Member

mrexodia commented Dec 6, 2023

Heya, hope you're doing well! Do you have a list of things left to do for this? It would be nice to eventually merge all the PRs, but I don't know how stable this is...

@torusrxxx
Copy link
Member Author

I was busy as usual at the end of the year. I have finished using it back in October. I didn't test this since then. The stack window is missing. However it would require a bit of work which unfortunately could not be finished in 2023, and I think it's fine, you can already use the dump like a stack window. Then it would be in maintenance mode.

@AppVeyorBot
Copy link

Download x64dbg 1.0.1855 (commit a609f1e98e by @torusrxxx)

@torusrxxx
Copy link
Member Author

The stack is finally there!

@AppVeyorBot
Copy link

Download x64dbg 1.0.1866 (commit 476db74b26 by @torusrxxx)

@mrexodia
Copy link
Member

🥳 will give it a try ASAP!

@AppVeyorBot
Copy link

Download x64dbg 1.0.1867 (commit 40e9c822bf by @torusrxxx)

@AppVeyorBot
Copy link

Download x64dbg 1.0.1870 (commit a3a59e37b1 by @torusrxxx)

@torusrxxx
Copy link
Member Author

Xrefs dialog is added so you can quickly find out what accessed this memory location. Extremely easy and fast.

@AppVeyorBot
Copy link

Download x64dbg 1.0.1871 (commit b12e9ee114 by @torusrxxx)

@AppVeyorBot
Copy link

Download x64dbg 1.0.1873 (commit 0a1fb28928 by @torusrxxx)

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

Successfully merging this pull request may close these issues.

Stack and memory dump in trace browser
3 participants