[patch ping] change lookup order of $localvars to happen before symbol tables

Mike Frysinger vapier@gentoo.org
Sun Sep 17 04:22:00 GMT 2006


On Saturday 16 September 2006 00:02, Daniel Jacobowitz wrote:
> Sorry, I'm way behind on patches, and it seems others don't have
> much time for review either.

no problem ... i just wasnt sure if it was a "people are overloaded and havent 
gotten a chance to review" or "people have reviewed just havent posted an 
opinion one way or the other"

> Scanning the list of internal variables is linear.  Let's not be
> wasteful with it; please save the result the first time you do it.

indeed ... that would go from 3 internal linear searches to 2 as the final 
case would be calling internal_lookup() ...

if we break up the the lookup_internal() up completely, splitting the creation 
of the variable into say "create_internal()", we could kill off the last 
linear search

> Would you mind resubmitting with those changes?

sure, ive attached two versions ... the first is just the previous patch with 
your requested changes while the second is that plus breaking up the 
internal_lookup() function into lookup_only_internal() and 
create_internal() ... doesnt matter to me which of these patches are accepted 
as they both accomplish my original goal :)
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20060917/3440dacf/attachment.sig>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gdb-lookup-internal-first-2.patch
Type: text/x-diff
Size: 2992 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20060917/3440dacf/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gdb-lookup-internal-first-3.patch
Type: text/x-diff
Size: 3695 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20060917/3440dacf/attachment-0001.bin>


More information about the Gdb-patches mailing list