aboutsummaryrefslogtreecommitdiff
path: root/sim/cris/mloop.in
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2023-12-19 20:04:34 -0500
committerMike Frysinger <vapier@gentoo.org>2023-12-21 20:16:26 -0500
commitc0e97c852595b9516d54688643c08918a446f36c (patch)
tree3cca7534f3ba674f35d97439f6543c7647cc6571 /sim/cris/mloop.in
parent10df3b929c72245bf363c11d6236637b4dc43cbc (diff)
downloadgdb-c0e97c852595b9516d54688643c08918a446f36c.zip
gdb-c0e97c852595b9516d54688643c08918a446f36c.tar.gz
gdb-c0e97c852595b9516d54688643c08918a446f36c.tar.bz2
sim: common: add $LINENO rewriting support to genmloop scripts
The generated mloop files can trigger compile time warnings. It can be difficult to see/understand where the original code is coming from as all the diagnostics point to the generated output. Using #line pragmas, we can point people to the original source files. Unfortunately, this code is written in POSIX shell, and that lacks support for line number tracking. The $LINENO variable, even when available, can just be plain wrong. For example, when using dash and subshells, $LINENO can end up having negative values. Add a wrapper script that will uses awk to rewrite the $LINENO variable to the right value to avoid all that. Basically lineno.sh takes an input script, rewrites all uses of $LINENO into the actual line number (and $0 into the original file name), and then executes the temporary script. This commit doesn't actually add #line pragmas to any files. That comes next.
Diffstat (limited to 'sim/cris/mloop.in')
0 files changed, 0 insertions, 0 deletions