This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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: New scope checking patch


2008/7/29 Tom Tromey <tromey@redhat.com>:
>>>>>> "Rob" == Rob Quill <rob.quill@gmail.com> writes:
>
> Rob> 2008-07-27   Rob Quill <rob.quill@gmail.com>
> Rob>    Add $in_scope as a type of expression.
>
> This seems like a good candidate for an internal function.  The syntax
> is nearly identical.

Hi Tom,

Are you saying that there is something that I need to do before this
can be committed? If so, could you explain a bit further? Where can I
find out about internal functions?

> The only difference is that, at the GCC Summit, we agreed that
> arguments to internal functions would be expressions.  So, instead of
> $in_scope(x) you would have to write $in_scope("x").

With regards to expressions, the patch in it's current form can only
determine the scope of variables. I do have a very rough patch with
some fairly major caveats which can deal with expressions. If this
patch it implemented as an internal function, what is to stop someone
passing an expression to $in_scope(), in which case, does the patch
need to be able to determine if a whole expression is in scope?
Because I ran into some problems when doing that before. I believe
they may even be discussed earlier in this thread.

Rob

> Internal functions are only in the python repository right now.  The
> patch consists of two parts: an internals-only part, and the part that
> exposes the functionality to the Python layer.
>
> I think we can submit the internals part as a separate patch.  AFAIK
> the only reason we haven't is just that there's been no need for it
> outside the Python work.
>
> Tom
>


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