 |
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
yoyoyip Cheater
Reputation: 0
Joined: 09 Apr 2006 Posts: 29
|
Posted: Sun Oct 01, 2006 6:52 am Post subject: Debug Register breakpoint weir behaviour. |
|
|
Hi there ,
I don't know why in order for debug register to work I must restart CE if I restart the debuggee.
CE debug register breakpoint working perfectly only for the first time, if I closed the application and restart, and reattached, I saw the debug breakpoint still appear in memory browser, but the register doesn't change at the breakpoint, no matter how I delete the breakpoint and enable it back, it is still not working, it is only working after I restart CE and reattached to the debuggee.
The following debug traces in DebugView are captured for the first time.
Going to enable the debugger to set a change reg breakpoint on ProcessID 2532(9e4) for debugreg0
This is one caused by me. Changing the registers
2=246
eax=1
ebx=0
EIP=40251a
PEFLAGS=AE4B0DD4
EFLAGS=246
-------
DR_7.L0=1
DR_7.L1=1
DR_7.L2=1
DR_7.L3=1
DR_6.B0=1
DR_6.B1=0
DR_6.B2=0
DR_6.B3=0
BP number = 0
Changing EDX from 1234 to 5555
Setting the resume flag and continue.
I only saw one line of debug trace if I reattached to the restart application after reenable the same breakpoint:
Going to enable the debugger to set a change reg breakpoint on ProcessID 1752(6d8) for debugreg0
Seem like breakpoint int 1 doesn't trigger on second attached. And why breakpoint still exist in second instance.
Appreciate anybody if can guide me where to look for in the source code that needed changes. |
|
Back to top |
|
 |
yoyoyip Cheater
Reputation: 0
Joined: 09 Apr 2006 Posts: 29
|
Posted: Tue Oct 03, 2006 3:40 pm Post subject: |
|
|
Code: | procedure TDebugevents.setbreakpoints;
var i: integer;
begin
debugregs.ContextFlags:=CONTEXT_DEBUG_REGISTERS;
debugregs.Dr7:=reg0set or reg1set or reg2set or reg3set;
debugregs.Dr0:=breakpoints[0];
debugregs.dr1:=breakpoints[1];
debugregs.dr2:=breakpoints[2];
debugregs.Dr3:=breakpoints[3];
for i:=0 to length(threadlist)-1 do
begin
suspendthread(threadlist[i]);
setthreadcontext(threadlist[i],debugregs);
resumethread(threadlist[i]);
end;
end; |
threadlist still kept the old threads eventhough we attached to new process, it failed to set the debug register correctly for the new thread.
Problem solved after retrieving new thread list from the newly attached process. |
|
Back to top |
|
 |
|
|
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
|
|