flat assembler
Message board for the users of flat assembler.

Index > Windows > cbthook failed when i click debugview 4.76 (latest)

Author
Thread Post new topic Reply to topic
sleepsleep



Joined: 05 Oct 2006
Posts: 13084
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 0010456
sleepsleep 22 Mar 2009, 06:57
like subject.
i downloaded the latest debugview 4.76
http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx

using the latest fasm 1.67.36
in the latest windows 7 build 7057 (i tried in windows xp sp2 too)

it hangs when i click debug view. weird....


cbthook.asm
myapp.asm

nothing magic here, but why it hangs the debugview is beyond me.


Description: cbthook.asm
Download
Filename: cbthook.asm
Filesize: 2.8 KB
Downloaded: 216 Time(s)

Description: myapp.asm
Download
Filename: myapp.asm
Filesize: 2.84 KB
Downloaded: 210 Time(s)



Last edited by sleepsleep on 22 Mar 2009, 16:02; edited 1 time in total
Post 22 Mar 2009, 06:57
View user's profile Send private message Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 13084
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 0010456
sleepsleep 22 Mar 2009, 16:00
ok, i found some weird stuff here.
if i disable the below
Code:
        .attach: 
        ; ------ 
       ; invoke  OutputDebugString,d1 
                jmp     .exit 
         
        .detach: 
        ; ------ 
        ;invoke  OutputDebugString,d2
    

then the application works without hanging the debugview. isn't this weird?
Post 22 Mar 2009, 16:00
View user's profile Send private message Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1150
Location: Russian Federation
comrade 22 Mar 2009, 22:32
OutputDebugString ("the producer") works by synchronizing with "the consumer" (DebugView, any other debugger) as described here:

http://unixwiz.net/techtips/outputdebugstring.html

I've looked over your sources and the only fishy thing you are doing is calling OutputDebugString under the loader lock (because you are in DLL main). That shouldn't be a problem though.

Can you clarify, what exactly hangs? DebugView or your application?
Post 22 Mar 2009, 22:32
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 13084
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 0010456
sleepsleep 23 Mar 2009, 04:30
hi there comrade,
thanks for the time you took to look at my source.
i think i figure out whats the problem.

it seems that i shouldn't use the debugview on the same machine that i run cbthook.

eg,
after i start debugview,
then i start my cbthook program,
then i activate the debugview window (sort of deadlock i think)
coz, my program will hook on the debugview and i use debugview to ODString... (i guess)

well, after i use a debugview remotely, hanging problem doesn't appear and all attach stuff detach gracefully.
Post 23 Mar 2009, 04:30
View user's profile Send private message 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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.