So to make up for my dumb question before (which I see is answered in the ChangeLog) I'm working on adding a feature to SLIME--I want to highlight frames in the debugger for which there is source. (I'm thinking of adding a key to toggle hiding and showing frames for which source is not available.) So here's my question--my first crack at it was to do this entirely in Emacs--when I'm inserting frames I call swank:frame-source-location-for-emacs for each frame and use a different face if the result contains :location. However if it occurs to me it might be more efficient to simply grab the source information along with the rest of the stack trace in debugger-info-for-emacs, i.e. instead of sending back a (number description) tuple for each stack frame, send back (number description source-location). Any thoughts on why that would be a bad way to go?
-Peter
Peter Seibel peter@javamonkey.com writes:
Any
thoughts on why that would be a bad way to go?
I think it is important that the debugger pops up as quickly as possible. Finding the source location makes things a bit slower; but I don't know how much. For some backends we need to read the source file to determine source location. If things go badly, we'd have to parse 10 files before we can send the backtrace to Emacs.
Perhaps your command can send a message like "give me the source locations for frames 1 to 20". This way you avoid the delay for the initial backtrace and your command is still reasonably efficient.
Helmut.
On Wed, Jun 23, 2004 at 08:24:34AM +0200, Helmut Eller wrote:
Peter Seibel peter@javamonkey.com writes:
Any thoughts on why that would be a bad way to go?
I think it is important that the debugger pops up as quickly as possible. Finding the source location makes things a bit slower; but I don't know how much. For some backends we need to read the source file to determine source location. If things go badly, we'd have to parse 10 files before we can send the backtrace to Emacs.
Perhaps your command can send a message like "give me the source locations for frames 1 to 20". This way you avoid the delay for the initial backtrace and your command is still reasonably efficient.
(random idea) Or perhaps pop up the debugger, and then start reading source information from the top frame down on an Emacs timer event. Some delay time can be added in between frames, and if the user closes the debugger, it will stop.
-bcd