This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: New scope checking patch
- From: Tom Tromey <tromey at redhat dot com>
- To: "Rob Quill" <rob dot quill at gmail dot com>
- Cc: "Eli Zaretskii" <eliz at gnu dot org>, "Jim Blandy" <jimb at red-bean dot com>, gdb-patches at sourceware dot org
- Date: Tue, 29 Jul 2008 15:45:15 -0600
- Subject: Re: New scope checking patch
- References: <baf6008d0711120829l3c0201aakf477dd4d6cfd440e@mail.gmail.com> <m3r6gf6kcz.fsf@codesourcery.com> <baf6008d0801181443s5321e5d5ud1c935aa8487a549@mail.gmail.com> <m34pda7ira.fsf@codesourcery.com> <baf6008d0801300405i47646b05pdb799d32ab71e005@mail.gmail.com> <u1w7zxjid.fsf@gnu.org> <8f2776cb0801301557t2e265b62u56d6df7cbcec1c84@mail.gmail.com> <utzkuws6q.fsf@gnu.org> <baf6008d0807271645o7d03dd94rd5b3f0d08302085a@mail.gmail.com> <m38wvk77qd.fsf@fleche.redhat.com> <baf6008d0807291404x255213b7id79efc6939d92eb1@mail.gmail.com>
- Reply-to: Tom Tromey <tromey at redhat dot com>
>>>>> "Rob" == Rob Quill <rob.quill@gmail.com> writes:
Tom> This seems like a good candidate for an internal function. The syntax
Tom> is nearly identical.
Rob> Are you saying that there is something that I need to do before this
Rob> can be committed?
Sorry -- to be completely clear, I am not a gdb maintainer.
So, you are free to ignore what I say.
Rob> Where can I find out about internal functions?
There's been some discussion on the various lists.
Otherwise, the python-gdb git repository.
Or, I suppose one of us can send out a patch.
Tom> The only difference is that, at the GCC Summit, we agreed that
Tom> arguments to internal functions would be expressions. So, instead of
Tom> $in_scope(x) you would have to write $in_scope("x").
Rob> If this patch it implemented as an internal function, what is to
Rob> stop someone passing an expression to $in_scope(), in which case,
Rob> does the patch need to be able to determine if a whole expression
Rob> is in scope?
In the internal-function form, in_scope would take a string-valued
argument. So, the expression would be evaluated first -- just like
any other function argument -- and then passed to the in_scope
primitive.
I guess this would prevent easy checking of whether an entire
expression is in scope. (BTW does that mean just checking all the
names in the expression?)
Tom