Rumour Posted November 13, 2007 Posted November 13, 2007 How can set hardware bkpoint by asm code? (masm)Google find only in C://Set your context flags like thisthis->cx.ContextFlags = CONTEXT_FULL | CONTEXT_DEBUG_REGISTERS;//Creates a Hardware Break on Execute Breakpointbool DebugEngine::SetBreakOnExecute(DWORD addr){ if (!this->UpdateContext()) { return false; } cx.Dr0 = addr; // set Bp addr cx.Dr7 = 0x1; //activate it if(!this->SetContext()) { return false; } return true;}But I need in masm, google not find.I ask in ARTeam too. No answer.This perhaps somebody here have know how?Thank for all tip.
human Posted November 13, 2007 Posted November 13, 2007 (edited) omfg please leave asm if you dont know how to use it. seems its not for you.its pure winapi not some ****ty mfc so what you want more, just write code with invoke.go to msdn.com and read about context structure and those winapi's that are in other functions like SetContextor is it too hard to writemov cx.dr0,addrand change cx to some other name due its asm, and cx is reg so is reserved wordso proper will bemov context.dr0,addrinvoke SetThreadContext,pinfo.hThread,o contextin my unsafecast you have in masm how to use context and getthreadcontext so change g to s and you have set Edited November 13, 2007 by human
Rumour Posted November 14, 2007 Author Posted November 14, 2007 Thank human. Will try him. Please accept I not superman. Need learn. Sorry if this stupid question was, perhaps so noone answer at ARTeam. I do what you say. Thank again.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now