MCPcopy Create free account
hub / github.com/TASEmulators/fceux / NewBreak

Function NewBreak

src/debug.cpp:214–252  ·  view source on GitHub ↗

* Adds a new breakpoint. * * @param hwndDlg Handle of the debugger window * @param num Number of the breakpoint * @param **/

Source from the content-addressed store, hash-verified

212* @param
213**/
214unsigned int NewBreak(const char* name, int start, int end, unsigned int type, const char* condition, unsigned int num, bool enable)
215{
216 // Finally add breakpoint to the list
217 watchpoint[num].address = start;
218 watchpoint[num].endaddress = 0;
219
220 // Optional end address found
221 if (end != -1)
222 {
223 watchpoint[num].endaddress = end;
224 }
225
226 // Get the breakpoint flags
227 watchpoint[num].flags = 0;
228 if (enable) watchpoint[num].flags|=WP_E;
229 if (type & WP_R) watchpoint[num].flags|=WP_R;
230 if (type & WP_F) watchpoint[num].flags|=WP_F;
231 if (type & WP_W) watchpoint[num].flags|=WP_W;
232 if (type & WP_X) watchpoint[num].flags|=WP_X;
233 if (type & BT_P) {
234 watchpoint[num].flags|=BT_P;
235 watchpoint[num].flags&=~WP_X; //disable execute flag!
236 }
237 if (type & BT_S) {
238 watchpoint[num].flags|=BT_S;
239 watchpoint[num].flags&=~WP_X; //disable execute flag!
240 }
241 if (type & BT_R) {
242 watchpoint[num].flags|=BT_R;
243 }
244
245 if (watchpoint[num].desc)
246 free(watchpoint[num].desc);
247
248 watchpoint[num].desc = (char*)malloc(strlen(name) + 1);
249 strcpy(watchpoint[num].desc, name);
250
251 return checkCondition(condition, num);
252}
253
254int GetPRGAddress(int A){
255 int result;

Callers 10

NewBreakWindowsFunction · 0.85
addRamReadBPMethod · 0.85
addRamWriteBPMethod · 0.85
addRamExecuteBPMethod · 0.85
addPpuReadBPMethod · 0.85
addPpuWriteBPMethod · 0.85
loadBreakpointMethod · 0.85
loadGameDebugBreakpointsFunction · 0.85
openBpEditWindowMethod · 0.85
handleDialogResponseFunction · 0.85

Calls 1

checkConditionFunction · 0.85

Tested by

no test coverage detected