microsoft/DbgShell

Need some rails to prevent dbgeng-unsupported scenarios like mixed dump + live proc

jazzdelightsme opened this issue · 0 comments

DbgEng.dll has a concept of "context": what is the current "system", the current process within that system, the current thread within that process, and the current frame within that thread. (See the DbgEngContext class.) DbgShell exposes this via its namespace. It supports switching between contexts, such as between threads, or between multiple processes in a live debugging scenario.

However, some combinations of context just don't work together. For instance, if you are attached to a dump, and then try to launch a new, live process under the debugger, dbgeng context gets completely discombobulated.

DbgShell needs to add some guard rails so that you don't end up in situations that don't work.