/// <summary> /// Returns the row and column text for a listgridview of functions. /// </summary> /// <param name="row">Cell row</param> /// <param name="column">Cell column</param> /// <returns></returns> public string getFunctionListCell(int row, int column, oVisPlayBar playBar) { // Get this row and column if(row<functions.Count && row >= 0 && functions[row] != null) { switch (column) { case 0: // Get the address description for this function HEAP_INFO heap = oMemoryFunctions.LookupAddressInMap(oProcess.map, functions[row].address); string name; // Generate the string representation of this address if (heap.associatedModule != null) { name = heap.associatedModule.ModuleName + " + 0x" + (functions[row].address - (uint)heap.associatedModule.BaseAddress).ToString("X"); } else { name = "0x" + functions[row].address.ToString("X"); } // Add the known name on a second line if (functions[row].name != "") name = functions[row].name + " - " + name; if (functions[row].disabled) name = "DISABLED " + name; return name; case 1: // Address return functions[row].address.ToString("X"); case 2: // Call count if (dataVis != null) { // Lets count the number of calls int tmpCount = dataVis.getCallCount(functions[row].address); // If we are near the maximum number of calls, lets add a + sign. This is because this function // stopped recorded further calls for performance reasons. (eg. a function being called millions // of times a second uses up a lot of diskspace to record!) string totalCount = tmpCount < Properties.Settings.Default.MaxRecordedCalls ? tmpCount.ToString() : tmpCount.ToString() + @"+"; // Get the selected region call count string selectedRegionCount; if (playBar != null) { selectedRegionCount = playBar.countCallSelected(functions[row].address).ToString(); }else { selectedRegionCount = ""; } // Return the two results return String.Concat(totalCount, "/", selectedRegionCount); } return "no data"; case 3: // Number of arguments and calling convention return String.Concat(functions[row].getNumParams().ToString(), " args"); default: return "?"; } } return "?"; }