Mercurial > hg > index.cgi
changeset 537:3f81d8b11e5b
Improve debug instrumentation for symbol registration
Separate data and code symbol reference registrations in debug output so the
correct address is shown.
author | William Astle <lost@l-w.ca> |
---|---|
date | Wed, 17 Aug 2022 16:34:28 -0600 |
parents | 33a59e232a5b |
children | 5f10e1913d1a |
files | lwasm/pass1.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lwasm/pass1.c Thu Jun 16 13:55:34 2022 -0600 +++ b/lwasm/pass1.c Wed Aug 17 16:34:28 2022 -0600 @@ -427,11 +427,10 @@ { if (cl -> sym && cl -> symset == 0) { - debug_message(as, 50, "Register symbol %s: %s", cl -> sym, lw_expr_print(cl -> addr)); - // register symbol at line address if ((cl -> insn >= 0) && (instab[cl -> insn].flags & lwasm_insn_setdata)) { + debug_message(as, 50, "Register symbol %s: %s (D)", cl -> sym, lw_expr_print(cl -> daddr)); if (!register_symbol(as, cl, cl -> sym, cl -> daddr, symbol_flag_none)) { // symbol error @@ -440,6 +439,7 @@ } else { + debug_message(as, 50, "Register symbol %s: %s", cl -> sym, lw_expr_print(cl -> addr)); if (!register_symbol(as, cl, cl -> sym, cl -> addr, symbol_flag_none)) { // symbol error