[PATCH] Add function name and file to semantic error messages for not found local variables.

Mark Wielaard mjw@redhat.com
Tue Nov 11 12:33:00 GMT 2008


On Tue, 2008-11-11 at 13:06 +0100, Przemysław Pawełczyk wrote:
> > In this case we cannot always just print the diename of the scope we are
> > looking at since that might be NULL (see just above in the function). In
> > that case we are just looking for the scope by address. And while we are
> > improving the error message, lets also add the same for the other error
> > case just above it. So I think we want something like the attached. Does
> > that work for you?
> 
> Yes, I didn't noticed NULL problem and unconsciously omitted second
> error message in this function, so your patch is definitely better
> (and works, of course).

Thanks for testing. Committed as:

2008-11-11  Przemysław Pawełczyk <przemyslaw@pawelczyk.it>
            Mark Wielaard <mjw@redhat.com>

    * tapsets.cxx (find_variable_and_frame_base): Add scope name to
    semantic error messages if available.

> Here it was a rather silly mistake (because of the precedent code, as
> you mentioned), but yet I must say that dataflow in systemtap is
> (currently) somewhat cryptic to me (I didn't spend enough time looking
> into it and sorry for this). I mean e.g. it's not obvious (to me)
> where scope_die in tapsets.cxx is not NULL for sure. However, that is
> my problem, no systemtap's.

I admit to be confused myself how the precise dataflow is at times. In
this case the NULL check just above this call was the hint. The
INTERNALS file has some hints. But most information does indeed come
from trying to read and track the code by hand.

Cheers,

Mark



More information about the Systemtap mailing list