Skip to content

Commit

Permalink
Search for debugger
Browse files Browse the repository at this point in the history
Add more locations the debugger might be in
Signed-off-by: Andrew Innes <andrew.c12@gmail.com>
  • Loading branch information
andrewc12 committed Oct 19, 2023
1 parent bc98214 commit 18d16cf
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion contrib/windows/parsedump/parsedump.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,32 @@

import re
import subprocess
import os


def find_first_existing_file(file_paths):
for file_path in file_paths:
if os.path.exists(file_path):
return file_path
return None # Return None if no file is found


# List of file paths to check
cdb_file_paths_to_check = [
"C:\\Program Files\\Windows Kits\\10\\Debuggers\\x64\\cdb.exe",
"C:\\Program Files (x86)\\Windows Kits\\10\\Debuggers\\x64\\cdb.exe",
"C:\\Program Files\\Windows Kits\\10\\Debuggers\\x86\\cdb.exe",
"C:\\Program Files (x86)\\Windows Kits\\10\\Debuggers\\x86\\cdb.exe"
]

cdbstr = find_first_existing_file(cdb_file_paths_to_check)

if first_existing_file:
print(cdbstr)
else:
print("cdb not found.")
exit()

cdbstr = "C:\\Program Files\\Windows Kits\\10\\Debuggers\\x64\\cdb.exe"
dumpfilestr = "C:\\Windows\\MEMORY.DMP"
symbolstr = "srv*;C:\\Program Files\\OpenZFS On Windows\\symbols\\;"

Expand Down

0 comments on commit 18d16cf

Please sign in to comment.