mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 19:42:36 +02:00
Merge remote-tracking branch 'origin/GP-5218_ghizard_PDB_source_lines_task_monitor'
This commit is contained in:
commit
aeb3f04ac3
2 changed files with 8 additions and 3 deletions
|
@ -391,7 +391,7 @@ public class DefaultPdbApplicator implements PdbApplicator {
|
|||
// as that allows us to fetch the function start, given any address within
|
||||
// the function
|
||||
if (applicatorOptions.applySourceLineNumbers()) {
|
||||
linesApplicator.process();
|
||||
linesApplicator.process(monitor);
|
||||
}
|
||||
// Options options = program.getOptions(Program.PROGRAM_INFO);
|
||||
// options.setBoolean(PdbParserConstants.PDB_LOADED, true);
|
||||
|
|
|
@ -32,6 +32,7 @@ import ghidra.util.Msg;
|
|||
import ghidra.util.SourceFileUtils;
|
||||
import ghidra.util.exception.AssertException;
|
||||
import ghidra.util.exception.CancelledException;
|
||||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
/**
|
||||
* Helper class to PdbApplicator for applying source line information
|
||||
|
@ -81,9 +82,10 @@ public class PdbSourceLinesApplicator {
|
|||
//==============================================================================================
|
||||
/**
|
||||
* Process all Module line information
|
||||
* @param monitor the task monitor
|
||||
* @throws CancelledException upon user cancellation
|
||||
*/
|
||||
public void process() throws CancelledException {
|
||||
public void process(TaskMonitor monitor) throws CancelledException {
|
||||
PdbDebugInfo debugInfo = pdb.getDebugInfo();
|
||||
if (debugInfo == null) {
|
||||
Msg.info(this, "PDB: Missing DebugInfo - cannot process line numbers.");
|
||||
|
@ -98,11 +100,14 @@ public class PdbSourceLinesApplicator {
|
|||
// Not processing user defined "Types" source information. TODO: ???
|
||||
|
||||
int numModules = debugInfo.getNumModules();
|
||||
monitor.initialize(numModules);
|
||||
monitor.setMessage("PDB: Importing module function source line information...");
|
||||
for (int num = 1; num <= numModules; num++) {
|
||||
pdb.checkCancelled();
|
||||
monitor.checkCancelled();
|
||||
Module module = debugInfo.getModule(num);
|
||||
processC11Lines(module);
|
||||
processC13Sections(module);
|
||||
monitor.incrementProgress(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue