Question on using winedbg when program does not crash, just becomes unresponsive

Peter Urbanec winehq.org at urbanec.net
Mon Nov 9 09:54:11 CST 2009


Dan Kegel wrote:
>   start winedbg without any app
>   say 'bt all' in winedbg
> Voila, you now have backtraces for every process, including the hung one.
> It's your job to get that into a text file and remove the uninteresting ones...


I've also been trying to debug a multithreaded app. There are at least 
two complications that winedbg throws up:

1. Is now documented in http://bugs.winehq.org/show_bug.cgi?id=20617

2. As far as I can tell, winedbg will not allow you to switch the 
current thread context. This means that even though you can get a 
backtrace of all threads in all processes, you actually can not examine 
the state of a specific thread.

I don't know enough about the internals of wine to go ahead and 
implement a "thread tid" command. I could manage the code in dbg.y and 
debug.l to implement the command line interface. When it comes to the 
actual implementation, I can sort of guess at what may need to be done 
there. However, I suspect that my naive attempts at an implementation 
are unlikely to produce an acceptable patch.

It can't be as simple as updating the value of dbg_curr_thread with the 
result of dbg_get_thread(dbg_curr_process, tid) and then calling 
GetThreadContext(dbg_curr_thread->handle, &dbg_context), can it?





More information about the wine-devel mailing list