mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 02:39:44 +02:00
GP-4025 - PDB - Use ByteProvider in place of RandomAccessFile
This commit is contained in:
parent
c225fac124
commit
4da04423bd
15 changed files with 152 additions and 114 deletions
|
@ -77,7 +77,7 @@ public class PdbDeveloperApplyDummyScript extends GhidraScript {
|
|||
memory.createUninitializedBlock(pdbFileName, program.getImageBase(),
|
||||
Memory.MAX_BLOCK_SIZE / 16, false);
|
||||
|
||||
try (AbstractPdb pdb = PdbParser.parse(pdbFile.getPath(), pdbReaderOptions, monitor)) {
|
||||
try (AbstractPdb pdb = PdbParser.parse(pdbFile, pdbReaderOptions, monitor)) {
|
||||
monitor.setMessage("PDB: Parsing " + pdbFile + "...");
|
||||
pdb.deserialize();
|
||||
DefaultPdbApplicator applicator = new DefaultPdbApplicator(pdb);
|
||||
|
|
|
@ -62,7 +62,7 @@ public class PdbDeveloperDumpScript extends GhidraScript {
|
|||
String message = "Processing PDB Dump of: " + pdbFileName;
|
||||
monitor.setMessage(message);
|
||||
Msg.info(this, message);
|
||||
try (AbstractPdb pdb = PdbParser.parse(pdbFileName, new PdbReaderOptions(), monitor)) {
|
||||
try (AbstractPdb pdb = PdbParser.parse(pdbFile, new PdbReaderOptions(), monitor)) {
|
||||
pdb.deserialize();
|
||||
FileWriter fileWriter = new FileWriter(dumpFile);
|
||||
BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);
|
||||
|
|
|
@ -84,8 +84,8 @@ public class PdbDeveloperDumpSetScript extends GhidraScript {
|
|||
for (IOEntry entry : entries) {
|
||||
monitor.checkCancelled();
|
||||
println("Processing PDB Dump of: " + entry.input());
|
||||
try (AbstractPdb pdb =
|
||||
PdbParser.parse(entry.input(), new PdbReaderOptions(), monitor)) {
|
||||
File pdbFile = new File(entry.input());
|
||||
try (AbstractPdb pdb = PdbParser.parse(pdbFile, new PdbReaderOptions(), monitor)) {
|
||||
pdb.deserialize();
|
||||
try (BufferedWriter bufferedWriter =
|
||||
new BufferedWriter(new FileWriter(new File(entry.output())))) {
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
*/
|
||||
package pdbquery;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
import java.util.Map.Entry;
|
||||
|
@ -59,7 +60,8 @@ public class PdbFactory {
|
|||
println(script, "Opening PDB: " + filename);
|
||||
|
||||
try {
|
||||
AbstractPdb pdb = PdbParser.parse(filename, new PdbReaderOptions(), monitor);
|
||||
File pdbFile = new File(filename);
|
||||
AbstractPdb pdb = PdbParser.parse(pdbFile, new PdbReaderOptions(), monitor);
|
||||
PdbIdentifiers identifiers = pdb.getIdentifiers();
|
||||
pdb.deserialize();
|
||||
PdbReaderMetrics metrics = pdb.getPdbReaderMetrics();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue