| 411 | } |
| 412 | |
| 413 | int CNodeBase::AddComment( const PVIEWINFO View, int x, int y ) |
| 414 | { |
| 415 | x = AddText( View, x, y, g_crComment, HS_NONE, _T( "//" ) ); |
| 416 | // Need the extra whitespace in "%s " after the %s to edit. |
| 417 | x = AddText( View, x, y, g_crComment, HS_COMMENT, _T( "%s " ), m_strComment ); |
| 418 | |
| 419 | if (m_nodeType == nt_hex64) |
| 420 | { |
| 421 | float flVal = *(float*)&View->Data[m_Offset]; |
| 422 | LONG_PTR intVal = *(LONG_PTR*)&View->Data[m_Offset]; |
| 423 | |
| 424 | if (g_bFloat) |
| 425 | { |
| 426 | if (flVal > -99999.0 && flVal < 99999.0) |
| 427 | x = AddText( View, x, y, g_crValue, HS_NONE, _T( "(%0.3f)" ), flVal ); |
| 428 | else |
| 429 | x = AddText( View, x, y, g_crValue, HS_NONE, _T( "(%0.3f)" ), 0.0f ); |
| 430 | } |
| 431 | |
| 432 | if (g_bInt) |
| 433 | { |
| 434 | if (intVal > 0x6FFFFFFF && intVal < 0x7FFFFFFFFFFF) |
| 435 | x = AddText( View, x, y, g_crValue, HS_NONE, _T( "(%I64d|0x%IX)" ), intVal, intVal ); |
| 436 | else if (intVal == 0) |
| 437 | x = AddText( View, x, y, g_crValue, HS_NONE, _T( "(%I64d)" ), intVal ); |
| 438 | else |
| 439 | x = AddText( View, x, y, g_crValue, HS_NONE, _T( "(%I64d|0x%X)" ), intVal, intVal ); |
| 440 | } |
| 441 | |
| 442 | // *** this is probably broken, let's fix it after |
| 443 | ULONG_PTR uintVal = (ULONG_PTR)intVal; |
| 444 | CString strAddress( GetAddressName( uintVal, FALSE ) ); |
| 445 | if (strAddress.GetLength( ) > 0) |
| 446 | { |
| 447 | if (g_bPointers) |
| 448 | { |
| 449 | //printf( "<%p> here\n", Val ); |
| 450 | if (uintVal > 0x6FFFFFFF && uintVal < 0x7FFFFFFFFFFF) |
| 451 | { |
| 452 | x = AddText( View, x, y, g_crOffset, HS_EDIT, _T( "*->%s " ), strAddress.GetString( ) ); |
| 453 | if (g_bRTTI) |
| 454 | x = ResolveRTTI( uintVal, x, View, y ); |
| 455 | |
| 456 | // Print out info from PDB at address |
| 457 | if (g_bSymbolResolution) |
| 458 | { |
| 459 | ULONG_PTR ModuleAddress = 0; |
| 460 | SymbolReader* pSymbols = NULL; |
| 461 | |
| 462 | ModuleAddress = GetModuleBaseFromAddress( uintVal ); |
| 463 | if (ModuleAddress != 0) |
| 464 | { |
| 465 | pSymbols = g_ReClassApp.m_pSymbolLoader->GetSymbolsForModuleAddress( ModuleAddress ); |
| 466 | if (!pSymbols) |
| 467 | { |
| 468 | CString moduleName = GetModuleName( uintVal ); |
| 469 | if (!moduleName.IsEmpty( )) |
| 470 | pSymbols = g_ReClassApp.m_pSymbolLoader->GetSymbolsForModuleName( moduleName ); |
nothing calls this directly
no test coverage detected