You open gdb and you paste the function (from python to end) there. 
After, when you encounter a eo_do function, instead of stepping into it, 
you call the function (just type eo_jump) and it will do the job alone 
and reach the function that you wanted.

On 12/04/2012 10:54 AM, Daniel Juyung Seo wrote:
> Awesome!!!!
> I and co-workers have hard time to debug with eo.
> This looks very good but how can I use it?
>
> Daniel Juyung Seo (SeoZ)
>
> On Tue, Dec 4, 2012 at 5:15 PM, daniel.za...@samsung.com <
> daniel.za...@samsung.com> wrote:
>
>> Hi all,
>>
>> I am sure you faced difficulties to debug your program due to changes
>> with Eo. It is hard to know which function will be called by eo_do or
>> eo_do_super because of inheritance.
>>
>> I have written a python function for gdb that helps a lot. The command
>> is eo_jump, no arguments.
>> You can execute it when you reach some eo_do/eo_do_super... and it will
>> jump over Eo code.
>>
>> This is a prototype so sorry for the potential bugs.
>>
>> For those who will look at this function, you can note some check that
>> the function is None, it is because Eo calls for memcpy. In this case,
>> we want it to not stop on this so we have to continue searching.
>>
>> Feel free to change, propose, hate this script :)
>>
>> Daniel (JackDanielZ)
>>
>> Function:
>> python
>> class Eo_jump(gdb.Command):
>>      def __init__(self):
>>         gdb.Command.__init__(self, "eo_jump", gdb.COMMAND_OBSCURE)
>>
>>      def invoke (self, arg, from_tty):
>>         while True:
>>            gdb.execute("step")
>>            self.priv_filename =
>> gdb.selected_frame().find_sal().symtab.filename
>>            self.priv_function = gdb.selected_frame().function()
>>            if (self.priv_filename != "lib/eo/eo.c") and
>> (self.priv_function != None):
>>               break
>>            if (self.priv_filename == "lib/eo/eo.c"):
>>               gdb.execute("step")
>>            if (self.priv_function == None):
>>               gdb.execute("finish")
>> Eo_jump()
>> end
>>
>>
>> ------------------------------------------------------------------------------
>> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
>> Remotely access PCs and mobile devices and provide instant support
>> Improve your efficiency, and focus on delivering more value-add services
>> Discover what IT Professionals Know. Rescue delivers
>> http://p.sf.net/sfu/logmein_12329d2d
>> _______________________________________________
>> enlightenment-devel mailing list
>> enlightenment-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>>
> ------------------------------------------------------------------------------
> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
> Remotely access PCs and mobile devices and provide instant support
> Improve your efficiency, and focus on delivering more value-add services
> Discover what IT Professionals Know. Rescue delivers
> http://p.sf.net/sfu/logmein_12329d2d
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>


------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to