help-octave
[Top][All Lists]
Advanced

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

Inoltra: Re: debug mex file in octave


From: John W. Eaton
Subject: Inoltra: Re: debug mex file in octave
Date: Wed, 25 Oct 2006 09:09:20 -0400

On 25-Oct-2006, Riccardo Corradini wrote:

|     * after the octave prompt appears, display the
| help for your dynamic function. That is, if your
| function is called 'myfunc.oct', call 'help myfunc'.
| This will load your dynamic funtion into octave space
| and gdb without tickling the bug

This part currently works for MEX files but might not in the future
because there is no help message stored in a MEX function, so there is
no point in Octave opening a MEX file to look for help.  For .oct
files, the help message can be stored in the .oct file, so this trick
will continue to work for them.

Also on 25-Oct-2006, frank wang wrote: 

> Then gdb got segmentation fault. The message is
> Starting program: path/fft_mx512.mex
> breakpoing 1 at ox36277c: file fft_mx512.cpp, line
> 40.
> warning: shared library handler failed to enable
> breakpoint
> Reading symbols from shared object read from target
> memory....done.
> Program received signal SIGSEGV, Segmentation fault.
> 0x00000001 in ?? ()
> (gdb)

Since you still have a (gdb) prompt, it is probably your program that
encountered the segfault, not gdb.  What does the gdb command "where"
tell you at this point?  If you have compiled with debugging symbols
and haven't stripped them when linking, then you should see some
useful information.  But if you compile without debugging symbols, or
remove them when linking, the debugger can't give you much
information.

Also, this is not really the right forum if what you really want is
help learning how to use gdb.

> However, since building octave for me
> is very difficult(too
> many dependency on external packages), so I decided
> to use the prebuild
> octave for Fedora.

First, if you want to rebuild a package from sources, it should not be
too hard.  Just download the sources for the RPM (or .deb file on
Debian systems) and rebuild using the same commands that the packagers
use.  Usually, this is just one or two commands, then you can install
the resulting RPM (or .deb) file as usual.  Sorry, I don't know
precisely the details.  Maybe someone else can post them.

If you want to build Octave from CVS on a Fedora or Debian system, it
is also relatively easy to install the build dependencies.  Both the
Fedora and Debian package managers maintain lists of build
dependencies, and it is possible to have the package manager install
all the dependencies at once.  Please see

  https://www.cae.wisc.edu/pipermail/bug-octave/2006-October/000956.html

for more details.

I guess this needs to go in the FAQ.

jwe


reply via email to

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