The MASM Forum Archive 2004 to 2012

General Forums => The Workshop => Topic started by: TNick on June 26, 2006, 10:06:16 AM

Title: Multithread & debug; DreawText
Post by: TNick on June 26, 2006, 10:06:16 AM
Here is my question:
What presumptions should me made when debuging a multithread program with (1) a software level debuger (Ex.: w32dasm) and (2) a hardware level debuger (Ex.: SoftIce), working in "Single step", for example?

- each thread perform a instruction per step
- the curent thread (the one that you see) perform the instructions and the other(s) are stopped
- the curent thread (the one that you see) perform the instructions and the other(s) are unpredictable
- another choice..



Another thing: by mistake, in a INVOKE DrawText ..., I've used a WORD parameter instead of a DWORD parameter at  <<int nCount -  string length, in characters >>. MASM32 assamble and link my program just fine, without saing anything. Is this a bug in MASM32?
Title: Re: Multithread & debug; DreawText
Post by: sluggy on June 26, 2006, 11:12:32 AM
First off, win32dasm is not a debugger, it is a disassembler, so it handles multi threaded apps just fine  :P I don't have much experience with Sice (R.I.P.), but i do have a LOT of experience with the VS debugger, and debugging multi threaded apps can be a real pain in the ass - you can be debugging one thread and then suddenly jump into another due to an event being raised or a callback executed.

With you INVOKE problem, need more information. If MASM compiled it ok then you must have declared it correctly according to the function proto that it had.

Title: Re: Multithread & debug; DreawText
Post by: TNick on June 26, 2006, 11:35:13 AM
Thanks for your answers. About DrawText:
- I didn't modify any of the standard inc or lib files within MASM32 package
- I repaced the WORD parameter with a DWORD parameter without any other modification, and it assamble just fine
- those parameters are LOCAL's
- I just made another try; the result is the same

Why was this post moved?
Best regards!