[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GUD octave support
From: |
John W. Eaton |
Subject: |
Re: GUD octave support |
Date: |
Wed, 05 Dec 2007 10:22:30 -0500 |
On 5-Dec-2007, Nick Roberts wrote:
|
| > | which is matched by a regexp in Emacs. I think that Octave should be
able
| > | to emit the same information, i.e., something like:
| > |
| > | Z^Z/home/nickrob/octave/example.m:4
| >
| > Sorry, but I'm not sure I follow exactly waht it is you want Octave to
| > do here. Instead of making analogies with gdb, how about showing
| > precisely what Octave should do?
|
| I'm not familiar enough with Octave to say precisely what it should do. I was
| trying to interpret what Daniel's referenced patch required from Emacs. This
| patch uses on gud-octavedb-marker-regexp given by:
|
| (setq gud-octavedb-marker-regexp
| "keyboard: stopped in\s\\(.*\\)\sat line \\([0-9]+\\)")
|
| which presumably matches output from Octave in some context. It appears that
| the filename that matches the first part is only a relative name as the patch
| goes to some trouble to find the full pathname for the file. It seemed to me
| it would be easier, and more robust, if Octave provided this information for
| Emacs. So instead of:
|
| keyboard: stopped in example.m at line 4
|
| something like:
|
| Z^Z/home/nickrob/octave/example.m:4
|
| This would enable Emacs to find and display the relevant file in a buffer with
| an arrow pointing to the given source line when Octave stopped.
|
| Normally a user would want the Octave's current behaviour, so this would only
| be provided when Octave was invoked with the "--fullname" option.
|
| Does that provide a clearer picture?
I think users would be surprised to see Z^ZFILENAME, or are you
suggesting that this is an optional output format, not the one used
for interactive users of Octave?
In any case, with the current version of Octave, I see the following
(for example):
octave:1> dbstop plot 1
ans = 181
octave:2> plot
plot: line 181, column 7
isscalar
keyboard: stopped in /usr/share/octave/2.9.17/m/plot/plot.m at line 181
so isn't that already sufficient information for GUD?
| > Also, I suspect that to be really useful inside Emacs' GUD mode,
| > Octave's debugging capabilities will need some improvement. It would
| > be helpful to have someone who could work on that project.
|
| What other capabilities do you have in mind?
We need Matlab compatible implementations of all of the following
functions:
dbclear Clear breakpoints
dbcont Resume execution
dbdown Change local workspace context when in debug mode
dbquit Quit debug mode
dbstack Function call stack
dbstatus List all breakpoints
dbstep Execute one or more lines from current breakpoint
dbstop Set breakpoints
dbtype List M-file with line numbers
dbup Change local workspace context
debug List M-file debugging functions
jwe
- GUD octave support, John W. Eaton, 2007/12/04
- Re: GUD octave support, Nick Roberts, 2007/12/05
- Re: GUD octave support,
John W. Eaton <=
- Re: GUD octave support, Nick Roberts, 2007/12/05
- Re: GUD octave support, John W. Eaton, 2007/12/05
- Re: GUD octave support, Nick Roberts, 2007/12/07
- Re: GUD octave support, John W. Eaton, 2007/12/07
- Re: GUD octave support, Nick Roberts, 2007/12/08
- Re: GUD octave support, John W. Eaton, 2007/12/10
- Re: GUD octave support, Nick Roberts, 2007/12/10
- Re: GUD octave support, John W. Eaton, 2007/12/11
- Re: GUD octave support, Nick Roberts, 2007/12/11
- Re: GUD octave support, Shai Ayal, 2007/12/11