Incorrect PID formatting?

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
JKWood
Newbie
Newbie
Posts: 3
Joined: Wed Feb 08, 2012 1:36 am

Incorrect PID formatting?

Post by JKWood »

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?
lahmbi5678
Level 7
Level 7
Posts: 823
Joined: Thu Aug 27, 2009 6:23 am

Post by lahmbi5678 »

Hi,

you probably should file a bug and CC Eric Pouech, who is doing most of the work on winedbg. Would you have been able to attach to the desired PID, if you entered it in hex format?
Locked