[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: eieio-debug-methodinvoke

From: Eric Ludlam
Subject: Re: eieio-debug-methodinvoke
Date: Wed, 21 Jan 2015 22:14:14 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

On 01/21/2015 01:48 PM, Stefan Monnier wrote:
Hi Eric,

Not sure if you've seen it, but on Emacs's master, EIEIO's
defgeneric/defmethod has been replaced by a brand new implementation (in
cl-generic).  Now that the main part of the switch is done, I'm working
on cleaning up all the regressions that this introduced.

I did a git pull tonight to check it out. I'm looking forward to trying out multiple-dispatch and native type dispatch method handling. I spent a lot of time optimizing the eieio version. Hopefully some of those same high level tricks remain. (Comments indicate so.)

In the meantime, my CEDET can't seem to load old .ede files. :( I'll assume I need to recompile or something for now.

Among them, there's eieio-debug-methodinvoke (in eieio-datadebug.el).
Looking at the code I can kind of see what this is meant to do, but
I can't seem to find a way to make it do something useful (in
I tried

    emacs -Q -f semantic-mode -l eieio-datadebug
    M-x eieio-debug-methodinvoke RET
    semanticdb-synchronize RET
    (semantic-decoration-unparsed-include-cache "toto") RET

but this just gave me ">#<list o' stuff: 2 entries>".  Do you have
a sample recipe that gives a good/useful result?

That function was useful when I was trying to get the method invocation order to be correct, and I needed a way to debug it. Since those old structures are gone, this function won't be needed by me anymore.

As for what it outputs, all the data-debug functions you run into in CEDET go into a data-debug mode. The problem I have debugging programs that use eieio objects, and some of the crazy structures that get built up in CEDET is that there is so much data, a simple princ (as from edebug) just can't tell you what's going on. As such, all the outputs for data-debug are usually very small. In the above case, just a list o' stuff.

Press SPC on any line that indicates there might be more to it, such as a #<list o stuff> or #<overlay > or some # object (usually colored) to open it up. If there are lists upon lists, you can keep drilling in, even recursive structures are opened.

If you have (semantic-mode 1) enabled, you could do:

M-x data-debug-eval-expression RET (semantic-fetch-tags) RET

in some Emacs Lisp buffer. You can navigate around the data structure browsing the tags using SPC to open/close, or n/p to move up/down or N/P to move up/down while also opening what's under point.

I have that fcn bound to M-: by default, and hooked into edebug via an A binding so I can eval large data values. I've become quite dependent on it.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]