dshikashio / Pybag

Python module for Windbg's dbgeng plus additional wrappers.
MIT License
56 stars 15 forks source link

Improve dbgdir search #17

Closed nsadeveloper789 closed 7 months ago

nsadeveloper789 commented 7 months ago

We've improved the search for the Windbg installation directory and related DLLs. Most important for us is the ability to override it. Even if we load from a configured directory first, pybag will load from its found directory upon import, leading to duplicate DLLs being loaded. We figured we could just port the user-override logic upstream and just let pybag do the loading. We accomplish this by preferring the directory given in the WINDBG_DIR environment variable, which we would set before invoking Python.

I also went ahead an implemented the lookup via Windows Registry that your comment alluded to. Failing all that, it falls back to the previous logic: search the two default directories.

dshikashio commented 7 months ago

Looks great - thanks!