================ rvDebuggerWindow::AddWatch Add a variable to the watch window. If update is set to true then also query the debugger client for the value ================ */
| 2413 | ================ |
| 2414 | */ |
| 2415 | void rvDebuggerWindow::AddWatch ( const char* varname, bool update ) |
| 2416 | { |
| 2417 | rvDebuggerWatch* watch; |
| 2418 | |
| 2419 | watch = new rvDebuggerWatch; |
| 2420 | watch->mVariable = varname; |
| 2421 | watch->mModified = false; |
| 2422 | watch->mValue = "???"; |
| 2423 | mWatches.Append ( watch ); |
| 2424 | |
| 2425 | // Add the variable to the watch control |
| 2426 | LVITEM item; |
| 2427 | item.mask = LVIF_PARAM; |
| 2428 | item.iItem = ListView_GetItemCount ( mWndWatch ) - 1; |
| 2429 | item.iSubItem = 0; |
| 2430 | item.lParam = (LPARAM)watch; |
| 2431 | ListView_InsertItem ( mWndWatch, &item ); |
| 2432 | |
| 2433 | // If update is set then request the value from the debugger client |
| 2434 | if ( update ) |
| 2435 | { |
| 2436 | mClient->InspectVariable ( varname, mCurrentStackDepth ); |
| 2437 | } |
| 2438 | } |
| 2439 | |
| 2440 | /* |
| 2441 | ================ |
no test coverage detected