Skip to content

Commit

Permalink
Allow targets not stored with the dump
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvita committed Aug 24, 2020
1 parent 82f470c commit c4966af
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
15 changes: 8 additions & 7 deletions PointerSearcher/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 14 additions & 3 deletions PointerSearcher/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ private async void buttonRead_Click(object sender, EventArgs e)
dataGridView1.Rows[0].Cells[2].Value = "0x" + Convert.ToString(reader.mainEndAddress(), 16);
dataGridView1.Rows[0].Cells[3].Value = "0x" + Convert.ToString(reader.heapStartAddress(), 16);
dataGridView1.Rows[0].Cells[4].Value = "0x" + Convert.ToString(reader.heapEndAddress(), 16);
dataGridView1.Rows[0].Cells[5].Value = "0x" + Convert.ToString(reader.TargetAddress(), 16);
// dataGridView1.Rows[0].Cells[5].Value = "0x" + Convert.ToString(reader.TargetAddress(), 16);
buttonSearch.Enabled = false;
buttonNarrowDown.Enabled = false;
buttonCancel.Enabled = true;
Expand Down Expand Up @@ -258,6 +258,18 @@ private void dataGridView1_CellBeginEdit(object sender, DataGridViewCellCancelEv
{
dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = ofd.FileName;
}
IDumpDataReader reader = CreateDumpDataReader(dataGridView1.Rows[e.RowIndex], true);
if (reader != null)
{
reader.readsetup();
dataGridView1.Rows[e.RowIndex].Cells[1].Value = "0x" + Convert.ToString(reader.mainStartAddress(), 16);
dataGridView1.Rows[e.RowIndex].Cells[2].Value = "0x" + Convert.ToString(reader.mainEndAddress(), 16);
dataGridView1.Rows[e.RowIndex].Cells[3].Value = "0x" + Convert.ToString(reader.heapStartAddress(), 16);
dataGridView1.Rows[e.RowIndex].Cells[4].Value = "0x" + Convert.ToString(reader.heapEndAddress(), 16);
dataGridView1.Rows[e.RowIndex].Cells[5].Value = "0x" + Convert.ToString(reader.TargetAddress(), 16);
// BM1

}
}
}

Expand All @@ -282,10 +294,9 @@ private async void buttonNarrowDown_Click(object sender, EventArgs e)
reader.readsetup();
dataGridView1.Rows[i].Cells[1].Value = "0x" + Convert.ToString(reader.mainStartAddress(), 16);
dataGridView1.Rows[i].Cells[2].Value = "0x" + Convert.ToString(reader.mainEndAddress(), 16);
dataGridView1.Rows[i].Cells[2].Value = "0x" + Convert.ToString(reader.mainEndAddress(), 16);
dataGridView1.Rows[i].Cells[3].Value = "0x" + Convert.ToString(reader.heapStartAddress(), 16);
dataGridView1.Rows[i].Cells[4].Value = "0x" + Convert.ToString(reader.heapEndAddress(), 16);
dataGridView1.Rows[i].Cells[5].Value = "0x" + Convert.ToString(reader.TargetAddress(), 16);
// dataGridView1.Rows[i].Cells[5].Value = "0x" + Convert.ToString(reader.TargetAddress(), 16);
long target = Convert.ToInt64(row.Cells[5].Value.ToString(), 16);

dumps.Add(reader, target);
Expand Down

0 comments on commit c4966af

Please sign in to comment.