[Wine] Incorrect PID formatting?

JKWood wineforum-user at winehq.org
Fri Feb 10 23:54:25 CST 2012

I was attempting to use winedbg to attach to a misbehaving Windows executable thread, when much to my surprise it spit out a different PID than the one I put in (in this case, it was telling me I couldn't attach to that PID.)

After digging in the source for winedbg, I discovered that it uses the %04x hexadecimal formatting string for displaying pretty much any piece of information in any debug message, and specifically in the "could not attach to" message (stack.c, line 419 in the current git).  So, we have a program that accepts decimal PIDs as arguments, but spits out the hexadecimal version in output messages.

The thing is, the printf formatting string doesn't affect the data itself, so I can't really see a valid reason for not returning the format users should expect. However, I'm always open to being told I'm wrong - is this behavior working as intended?

More information about the wine-users mailing list