diff options
author | Mike Frysinger <vapier@gentoo.org> | 2023-12-19 20:13:22 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2023-12-21 20:16:26 -0500 |
commit | 6003fe166df2cd80030ae4a228ac105ae13f477e (patch) | |
tree | 9d50df58ef62f89ed1f1ad1b9326f10a8c07c333 /sim/lm32 | |
parent | c0e97c852595b9516d54688643c08918a446f36c (diff) | |
download | gdb-6003fe166df2cd80030ae4a228ac105ae13f477e.zip gdb-6003fe166df2cd80030ae4a228ac105ae13f477e.tar.gz gdb-6003fe166df2cd80030ae4a228ac105ae13f477e.tar.bz2 |
sim: mloop: add #line pragmas everywhere
This will make compiler diagnostics much better with generated code
so people can understand the original source file.
Diffstat (limited to 'sim/lm32')
-rw-r--r-- | sim/lm32/mloop.in | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sim/lm32/mloop.in b/sim/lm32/mloop.in index 574f00a..d5dc1ed 100644 --- a/sim/lm32/mloop.in +++ b/sim/lm32/mloop.in @@ -32,6 +32,7 @@ case "x$1" in xsupport) cat <<EOF +#line $LINENO "$0" #include <stdlib.h> static INLINE const IDESC * @@ -130,6 +131,7 @@ xinit) xextract-simple | xextract-scache) cat <<EOF +#line $LINENO "$0" { CGEN_INSN_INT insn = GETIMEMUSI (current_cpu, vpc); extract (current_cpu, vpc, insn, SEM_ARGBUF (sc), FAST_P); @@ -149,6 +151,7 @@ xextract-pbb) # SET_INSN_COUNT(n) must be called to record number of real insns. cat <<EOF +#line $LINENO "$0" { const IDESC *idesc; int icount = 0; @@ -183,6 +186,7 @@ xfull-exec-* | xfast-exec-*) # Outputs: vpc cat <<EOF +#line $LINENO "$0" /* Update cycle counter */ SET_H_CSR (LM32_CSR_CC, GET_H_CSR (LM32_CSR_CC) + 1); #if (! FAST_P && WITH_SEM_SWITCH_FULL) || (FAST_P && WITH_SEM_SWITCH_FAST) |