View previous topic :: View next topic |
Author |
Message |
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Mon Jan 25, 2021 4:51 am Post subject: |
|
|
You need to set the RF flag (bit 16) in the flags register else it will break again on the instruction
unless you're on XP which doesn't support RF in which case you need to disable the breakpoint, do a single step, and set the breakpoint back
also, you're supposed to suspend the thread when you set the breakpoint (not that needed for debug registers only but still recommended)
which brings to the next issue: You're not getting/setting the register context when the breakpoint hits. Only the debugregister context is being read out and written.
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
Matteusin How do I cheat? Reputation: 0
Joined: 24 Jan 2021 Posts: 3
|
Posted: Tue Jan 26, 2021 12:36 am Post subject: |
|
|
Dark Byte wrote: | You need to set the RF flag (bit 16) in the flags register else it will break again on the instruction
unless you're on XP which doesn't support RF in which case you need to disable the breakpoint, do a single step, and set the breakpoint back
also, you're supposed to suspend the thread when you set the breakpoint (not that needed for debug registers only but still recommended)
which brings to the next issue: You're not getting/setting the register context when the breakpoint hits. Only the debugregister context is being read out and written. |
Thank you, Dark Byte!
I apologize, I was careless and ended up deleting my main question.
I managed to solve it, the EFLAGS was really missing.
Could you tell me if it is possible to add more than one debug point?
Again, sorry for the English
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Tue Jan 26, 2021 1:44 am Post subject: |
|
|
you can set 4. Look up the dr7 register and dr0 to dr3
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
Matteusin How do I cheat? Reputation: 0
Joined: 24 Jan 2021 Posts: 3
|
Posted: Tue Jan 26, 2021 10:40 am Post subject: |
|
|
Dark Byte wrote: | you can set 4. Look up the dr7 register and dr0 to dr3 |
Um ... This limitation complicated things!
I found something about Software Breakpoints, could you recommend some code for study? In any language
Thanks
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Tue Jan 26, 2021 3:36 pm Post subject: |
|
|
you can use software breakpoints by writing a $cc at the start of an instruction and capture the software breakpoint exception
then do your stuff, restore the byte, set the trap flag in eflags
suspend all other threads in the game except the current one
resume debugging
wait for the single step exception event
write a $cc back, resume all previously frozen threads and resume debugging
keep in mind that integrity checks detect them, so if you where using hardware bp's to bypass integrity checks, then it won't work
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
Matteusin How do I cheat? Reputation: 0
Joined: 24 Jan 2021 Posts: 3
|
Posted: Wed Jan 27, 2021 9:04 pm Post subject: |
|
|
Dark Byte wrote: | you can use software breakpoints by writing a $cc at the start of an instruction and capture the software breakpoint exception
then do your stuff, restore the byte, set the trap flag in eflags
suspend all other threads in the game except the current one
resume debugging
wait for the single step exception event
write a $cc back, resume all previously frozen threads and resume debugging
keep in mind that integrity checks detect them, so if you where using hardware bp's to bypass integrity checks, then it won't work |
Thank you very much, Dark!
I will really have to stick to my routine on BP hardware. I will study the VEH Debugger to implement
|
|
Back to top |
|
|
|