flat assembler
Message board for the users of flat assembler.

Index > Windows > [solved] x64dbg and OutputDebugStringW() issue...

Author
Thread Post new topic Reply to topic
AsmGuru62



Joined: 28 Jan 2004
Posts: 1441
Location: Toronto, Canada
AsmGuru62
Hi,

I was about to do some tracing logs for the x64 app I am writing, but I hit some kind of a problem with using OutputDebugStringW().
x64dbg prints my logs sometimes twice and sometimes once, obviously, I call the API once. Not sure where to look for a solution.
I tried a few options in the list of settings for x64dbg debugger, but nothing helps.

Anyone knows how to make it work?
Post 20 Mar 2022, 15:24
View user's profile Send private message Send e-mail Reply with quote
macomics



Joined: 26 Jan 2021
Posts: 483
Location: Russia
macomics
Unicode: OutputDebugString
Quote:
Important In the past, the operating system did not output Unicode strings via OutputDebugStringW and instead only output ASCII strings. To force OutputDebugStringW to correctly output Unicode strings, debuggers are required to call WaitForDebugEventEx to opt into the new behavior. On calling WaitForDebugEventEx, the operating system will know that the debugger supports Unicode and is specifically opting into receiving Unicode strings.
Post 20 Mar 2022, 16:04
View user's profile Send private message Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1441
Location: Toronto, Canada
AsmGuru62
Nice!
I used OutputDebugStringA() in my x64 code and it worked.
Now I see only one log entry for my logging calls.
Thank you!
Post 20 Mar 2022, 20:02
View user's profile Send private message Send e-mail Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.