GP-1981 - Checkpoint - Function Call Graph

This commit is contained in:
dragonmacher
2022-07-01 18:36:03 -04:00
committed by ghidragon
parent 16e32317f0
commit 60b1ae8b44
15 changed files with 276 additions and 41 deletions

View File

@@ -5,6 +5,7 @@
##MODULE IP: Tango Icons - Public Domain
Module.manifest||GHIDRA||||END|
data/ExtensionPoint.manifest||GHIDRA||||END|
data/functiongraph.theme.properties||GHIDRA||||END|
src/main/help/help/TOC_Source.xml||GHIDRA||||END|
src/main/help/help/shared/arrow.gif||GHIDRA||reviewed||END|
src/main/help/help/shared/close16.gif||GHIDRA||reviewed||END|

View File

@@ -0,0 +1,46 @@
[Defaults]
color.bg.functiongraph = color.bg
color.fg.label.picked = color.fg
color.fg.label.non-picked = color.fg.disabled
color.bg.functiongraph.vertex.group = rgb(226, 255, 155)
color.bg.functiongraph.vertex.entry = color.palette.lightgreen
color.bg.functiongraph.vertex.exit = color.palette.lightred
color.bg.functiongraph.vertex.picked = color.palette.yellow
color.bg.functiongraph.edge.fall-through = color.flowtype.fall-through
color.bg.functiongraph.edge.fall-through.highlight = rgb(255, 127, 127)
color.bg.functiongraph.edge.jump.conditional = color.flowtype.jump.conditional
color.bg.functiongraph.edge.jump.conditional.highlight = green
color.bg.functiongraph.edge.jump.unconditional = color.flowtype.jump.unconditional
color.bg.functiongraph.edge.jump.unconditional.highlight = rgb(127, 127, 255)
color.bg.functiongraph.paint.icon = rgb(189, 221, 252) // gentle pale blue
[Dark Defaults]
// color.bg.functiongraph = color.bg
// color.fg.label.picked = color.fg
// color.fg.label.non-picked = color.fg.disabled
color.bg.functiongraph.vertex.group = rgb(226, 222, 179) // TODO confirm value
// color.bg.functiongraph.vertex.entry = color.palette.lightgreen
// color.bg.functiongraph.vertex.exit = color.palette.lightred
// color.bg.functiongraph.vertex.picked = color.palette.yellow
// color.bg.functiongraph.edge.fall-through = color.flowtype.fall-through
color.bg.functiongraph.edge.fall-through.highlight = rgb(165, 76, 80)
// color.bg.functiongraph.edge.jump.conditional = color.flowtype.jump.conditional
color.bg.functiongraph.edge.jump.conditional.highlight = rgb(95, 160, 196)
// color.bg.functiongraph.edge.jump.unconditional = color.flowtype.jump.unconditional
color.bg.functiongraph.edge.jump.unconditional.highlight = rgb(140, 162, 88)
// TODO dark version color.bg.functiongraph.paint.icon = // TODO

View File

@@ -59,8 +59,7 @@ import ghidra.program.model.symbol.Symbol;
import ghidra.program.model.symbol.SymbolTable;
import ghidra.program.util.ProgramLocation;
import ghidra.program.util.ProgramSelection;
import ghidra.util.HTMLUtilities;
import ghidra.util.HelpLocation;
import ghidra.util.*;
import resources.ResourceManager;
public class ListingGraphComponentPanel extends AbstractGraphComponentPanel {
@@ -561,11 +560,7 @@ public class ListingGraphComponentPanel extends AbstractGraphComponentPanel {
private Color getToolTipColorForEdge(FGEdge edge) {
FunctionGraphOptions options = controller.getFunctionGraphOptions();
Color c = options.getColor(edge.getFlowType());
return withAlpha(c, 125);
}
private Color withAlpha(Color c, int alpha) {
return new Color(c.getRed(), c.getGreen(), c.getBlue(), 125);
return ColorUtils.withAlpha(c, 125);
}
private Address getPreviewAddress(boolean forward) {