MCPcopy Create free account
hub / github.com/dhewm/dhewm3 / AddWatch

Method AddWatch

neo/tools/debugger/DebuggerWindow.cpp:2415–2438  ·  view source on GitHub ↗

================ rvDebuggerWindow::AddWatch Add a variable to the watch window. If update is set to true then also query the debugger client for the value ================ */

Source from the content-addressed store, hash-verified

2413================
2414*/
2415void 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================

Callers 2

WndProcMethod · 0.80
DlgProcMethod · 0.80

Calls 2

InspectVariableMethod · 0.80
AppendMethod · 0.45

Tested by

no test coverage detected