* Adds a new breakpoint. * * @param hwndDlg Handle of the debugger window * @param num Number of the breakpoint * @param **/
| 212 | * @param |
| 213 | **/ |
| 214 | unsigned 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 | |
| 254 | int GetPRGAddress(int A){ |
| 255 | int result; |
no test coverage detected