[Bug 7560] ollydbg fails to debug multithreaded apps

Wine Bugs wine-bugs at winehq.org
Fri Mar 16 05:30:44 CDT 2007


------- Additional Comments From focht at gmx.net  2007-16-03 05:30 -------

you can reproduce this with single threaded apps too - just show the "threads"

Looking at the fixme you might be out of luck.

--- snip ---
dlls/ntdll/thread.c:NtQueryInformationThread( ThreadTimes)
/* We call times(2) for kernel time or user time */
/* We can only (portably) do this for the current thread */
 if (handle == GetCurrentThread())
                    struct tms time_buf;
                    long clocks_per_sec = sysconf(_SC_CLK_TCK);

                    kusrt.KernelTime.QuadPart = (ULONGLONG)time_buf.tms_stime *
10000000 / clocks_per_sec;
                    kusrt.UserTime.QuadPart = (ULONGLONG)time_buf.tms_utime *
10000000 / clocks_per_sec;
                    kusrt.KernelTime.QuadPart = 0;
                    kusrt.UserTime.QuadPart = 0;
                    FIXME("Cannot get kerneltime or usertime of other threads\n");
--- snip ---

times(2) and getrusage(2) wont do any good here for child threads.
One might read out /proc table info for individual threads but that query is
very costly and the info returned is not accurate at all.

There is some lengthy discussion regarding kernel/user time of thread on the
windows side too:


In short: forget these values.

Ollydbg queries the info by calling GetThreadTimes() (which in turn calls
NtQueryInformationThread( ThreadTimes)).
If the flooding bothers you, replace the FIXME() with WARN() or remove it
I assume there wont be a fix soon.


Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the wine-bugs mailing list