]> sourceware.org Git - systemtap.git/commit
translator: disambiguate runtime errors better
authorFrank Ch. Eigler <fche@redhat.com>
Wed, 4 Nov 2020 21:27:08 +0000 (16:27 -0500)
committerFrank Ch. Eigler <fche@redhat.com>
Wed, 4 Nov 2020 21:27:08 +0000 (16:27 -0500)
commit9102da049abcb24370c28ff5ed1ad8b06387bd5a
treeac6705b62ab502c06c57b5ad0756add0ae545bfd
parent016750508e154c2177599ac63d78fdf9bd172ef5
translator: disambiguate runtime errors better

If routine runtime errors occur during execution, the c->last_stmt
variable is printed to the user as to best suspected script location
of the failure.  As an optimization, this variable is not set at every
little point during statement/expression evaluation that are not
likely to cause errors.  But we overlooked one spot where it's
absolutely needed: around function calls, especially into synthetic
embedded-c functions that process $context variables.  That meant that
error messages could misidentify some other recent but nonspecific
point for an error.

Now we add a c->last_stmt set immediately before each function call,
after its actual arguments are executed.  This placement also covers
the case where the arguments themselves might fail during evaluation.
translate.cxx
This page took 0.027673 seconds and 5 git commands to generate.