[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
function reload
From: |
John W. Eaton |
Subject: |
function reload |
Date: |
Fri, 18 Nov 2011 20:38:03 -0500 |
On 18-Nov-2011, Matyas Sustik wrote:
| I have an inconvenience when debugging octave programs. Maybe someone
| here has found a way to do it better.
|
| When I debug my oct -file (actually --mex type) then I have to restart
| octave after each recompile of the code, otherwise
| a segfault occurs. This happens even when I compile from inside
| octave using mkoctfile. It would be nice if the compiler would
| unload the function before it is recompiled. (I would consider doing
| a patch for this if someone points me to the right direction
| and gets me started. I have never touched the octave code before.)
|
| Actually, I compile using a Makefile outside of the octave session.
| Is there any way to make this work in that scenario?
| To be clear here is what I am doing:
|
| (shell> refers to commands outside the octave session)
| octave3.2:3> foo()
| shell> make foo.mex
| octave3.2:3> foo()
| panic: Segmentation fault -- stopping myself...
|
| Recompiling is a typical action during debugging. I hate to reload
| the environment after every recompile.
Here is what I see with 3.4.3 and the current development version:
octave:1> mex myhello.c
octave:2> myhello
ans = 1.2346
## edit the file myhello.c
octave:3> mex myhello.c
octave:4> myhello
warning: library /export/home/jwe/myhello.mex not reloaded due to existing
references
ans = 1.2346
There is no crash, but this behavior is not right either. What should
happen is that the function and it should be reloaded automatically.
That works correctly for .oct files. I think it should also work for
.mex files, and I thought that it did at some point in the past.
So that this issue won't be forgotten, please file a bug report in the
bug tracker:
https://savannah.gnu.org/bugs/?func=additem&group=octave
jwe
- function reload, Matyas Sustik, 2011/11/18
- function reload,
John W. Eaton <=