Symbolise site addresses with the waste report's own symboliser.
(binary, summaries, sites)
| 53 | |
| 54 | |
| 55 | def load_symbols(binary, summaries, sites): |
| 56 | """Symbolise site addresses with the waste report's own symboliser.""" |
| 57 | if not binary or not summaries: |
| 58 | return {} |
| 59 | import importlib.util |
| 60 | import os |
| 61 | spec = importlib.util.spec_from_file_location( |
| 62 | "memwaste_report", os.path.join(os.path.dirname(os.path.abspath(__file__)), "memwaste-report.py")) |
| 63 | mod = importlib.util.module_from_spec(spec) |
| 64 | spec.loader.exec_module(mod) |
| 65 | return mod.symbolise(binary, summaries[-1].get("image_base", "0x0"), list(sites)) |
| 66 | |
| 67 | |
| 68 | def linear_slope(values): |