- 1 year ago
Obtain main thread callstack from a proccess dump that was run with Dr Memory
If you have a process dump that was generated using Dr. Memory and you want to obtain the call stack of the main thread, you can follow these steps:
- Open the dump file: Use the
drmemory.exe
command-line tool to open the process dump. You can do this by running the following command:
luadrmemory.exe -quiet -dump <dump_file_path>
Replace <dump_file_path>
with the path to your process dump file.
Find the main thread: Look for the main thread ID in the output of Dr. Memory. The main thread ID is usually the first thread listed in the output.
Obtain the call stack: Once you have the main thread ID, you can obtain its call stack by using the
drmemory.exe
tool again with the-callstack
option. Run the following command:
phpdrmemory.exe -quiet -callstack <dump_file_path> <main_thread_id>
Replace <main_thread_id>
with the ID of the main thread that you obtained in step 2.
- Analyze the call stack: The output of Dr. Memory's call stack command will show you the function calls that were on the main thread's call stack at the time the dump was taken. You can use this information to diagnose issues and debug your application.
Note that the drmemory.exe
tool must be in your system's PATH variable for these commands to work. You may also need to adjust the command-line options based on your specific use case.