This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]