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

Because of the work needs, I need to understand PartitionAlloc, this project is very good, can you provide more detailed usage? I don't really understand how to use it. #1

Open
eternalsakura opened this issue Nov 17, 2018 · 6 comments

Comments

@eternalsakura
Copy link

Because of the work needs, I need to understand PartitionAlloc, this project is very good, can you provide more detailed usage? I don't really understand how to use it.
thanks!

@msmania
Copy link
Owner

msmania commented Nov 17, 2018

Have you ever used Windows Debugger? This is a debugger extension for Windows Debugger.

Getting Started with WinDbg (User-Mode) - Windows drivers | Microsoft Docs
https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/getting-started-with-windbg

I also wrote the following article about PartitionAlloc before. It might be helpful if Google translate works well.
https://qiita.com/msmania/items/1a10d5b7d20f6455b9b1

@eternalsakura
Copy link
Author

thanks!I know a little about windbg, but how to install it into windbg?
Do I need to compile this project myself?

@eternalsakura
Copy link
Author

Can it be used directly to debug release chrome?thanks!

@msmania
Copy link
Owner

msmania commented Nov 19, 2018

Yes, you need to build this project first. Build steps are easy. Download the latest Visual Studio Community (or other editions if you can afford to pay for it), open "x86/x64 Native Tools Command Prompt", and run NMAKE without any options. Then you'll get a extension DLL cr.dll, which can be loaded by running the debugger command .load <path to cr.dll>.

Loading Debugger Extension DLLs - Windows drivers | Microsoft Docs
https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/loading-debugger-extension-dlls

You don't need to build Chromium on your own. This works with the official Chrome/ChromeCanary. To do that, you need to get the private symbol. Please check the section "Symbol server" in the following page. Actually if you use your private Chromium, you need to modify the extension's code because the name of Chromium's core module is different and I hardcoded the name as chrome_child.dll.

Debugging Chromium on Windows - The Chromium Projects
https://www.chromium.org/developers/how-tos/debugging-on-windows

The page above introduces some parameters for chrome.exe that might be helpful, but it's just optional. Just launching Chrome as usual, and attaching your debugger to a render process is good enough.

I have not used this extension for a while. Probably it doesn't work with the latest Chrome now. I'll check and update if needed.

@msmania
Copy link
Owner

msmania commented Nov 22, 2018

I've updated PartitionAlloc commands so that you can use it to debug Chrome 70.

@eternalsakura
Copy link
Author

thanks!

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