Fix display of project/platform cross-ref adjustments

We were trying to use the in-file calculation for an external
address, so the adjustment was always zero.

Also, don't pass a fill brush for wireframe rendering.  (No change
in behavior.)
This commit is contained in:
Andy McFadden committed 2020-03-17 13:49:14 -07:00
1 parent 1da98d8628
commit 63b84dcece
2 files changed
+3 -4

No files matched your search

+2 -3
View File
@@ -1541,9 +1541,8 @@ namespace SourceGen {
sym.SymbolSource == Symbol.Source.Platform) {
DefSymbol defSym = sym as DefSymbol;
int adj = 0;
if (operandOffset >= 0) {
adj = defSym.Value - operandOffset;
}
Debug.Assert(operandOffset < 0); // outside file scope
adj = defSym.Value - attr.OperandAddress;
defSym.Xrefs.Add(
new XrefSet.Xref(offset, true, xrefType, accType, adj));
} else {
+1 -1
View File
@@ -311,7 +311,7 @@ namespace SourceGen {
using (DrawingContext dc = dv.RenderOpen()) {
dc.DrawRectangle(Brushes.Black, null, new Rect(0, 0, bounds.Width, bounds.Height));
Pen pen = new Pen(Brushes.White, 1.0);
dc.DrawGeometry(Brushes.White, pen, geo);
dc.DrawGeometry(null, pen, geo);
}
bitmap.Render(dv);