Log in

View Full Version : Question on a breakpoint (new to olly and everything else)


loopah
June 11th, 2005, 06:35
ok first let me explain the circumstances, I am new to messing with a debugger, I'm having fun with it tho and want to learn =P.

heres my Q: There is this breakpoint that is watching all the send commands, now when I set this breakpoint it is pausing every second so I cant trace a command that I want to see when I ask the program to send something, how does one go about excluding all the commands that are making the program pause so I can watch it accurately?

loopah
June 11th, 2005, 06:36
ps , remember I am knew so please explain in terms a noob would understand ><

blabberer
June 11th, 2005, 07:08
you need to understand windows its message loops assembly and a lot of other little gems and gotchas

simply put every appliction has a message queue that loops infinitely
handling what it is programmed to handle and ignoring passing all the rest to the default handlers

windows is driven by messages
it starts from 0 doesnt have a definate end you can #define my message == 0xffffffff reggister it to your program and code a handler that exclusivly handles that message

well when a message is generated system allots a little place and puts it there

so the infinite loop which contain a simple PeekMessage() takes a look periodically at that place if it finds system has put a message in that place
it gives it to TranslateMessage() gets it translated and sends it to the winproc with DispatchMessage()

now in the winproc you may have coded a handler to handle the specific message then it is handled and a return value HANDLED is returned to queue else a return value handle NOT HANDLED is returned to the queue

the queue wil then pass the message back to system and system then checks if all of the message queues have aceesed the message
if all the waiting queues have aceessed it and has returned handled or not handled the sytem discards the messages or asks a top level handler to take care of it

now since this loop is executed infinitely till the winproc handles Exitmessage and terminates it self
if by chance you put a break in this loop you are bound to break every few nanoseconds

now its already a big essay hope i didnt make any mistakes and you can digest the message

loopah
June 11th, 2005, 07:27
oooooh ok, so instead of having the application being asked for the information from the system and sending it back, write a code for the application that will auto send to the system so it will then be bypassed?

loopah
June 11th, 2005, 07:28
or is that not possible?