MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Start Debugger for MathLink from Mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg20116] Re: Start Debugger for MathLink from Mathematica
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Sat, 2 Oct 1999 03:04:49 -0400
  • Organization: Universitaet Leipzig
  • References: <7suvjr$22f@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

clearly I have no idea. I typical call the program with -linkcreate.
This pops up a small message box with Link "xyz" created.

Than I conncet with

Install[LinkConnect["xyz"]]

in Mathematica. I think it is not so hard to type 3 letters and the OK
Button of the message box.

Ok I'm using Borland C/C++ and I can simply set the arguments for the
debugger in the
IDE

For more complicated situations I switch to a unix box and use a
terminal window
to print out the data I need.

How ever I use the debugger not often because I develop the
program/algorithm
with out any Mathematica calls. The MathLink interface is the last part,
that is
added to the program.
Than you can be sure that all new errors are due to the parameter
transport and not
in your core code.

That is the reason why MathGL3d has a standalone mode and several
command line switches.
So that I can debug allmost everything with in the standalone mode 
and if I know the new function works correctly I add the templates.

All my other programs have started with a standalone version and where
later converted
to MathLink. You can see it in my book where allmost every MathLink
proggram also
has a unix/dos commandline driven brother. 

Hope that helps
  Jens
hanssen at zeiss.de wrote:
> 
> Hi, all
> 
> I am debugging of a MathLink program under WinNT-SP3 with Watcom
> C/C++.
> 
> I see myself over and over typing the same stuff:

> I want to automate this and call the debugger with an equivalent of
> the command line
> 
>      wdw prog -linkmode listen -linkname nxxx
> 
> and then attach to the link nxxx from Mathematica using
> 
>     link=Install["nxxx", LinkMode->Connect]
> 
> This command line approach might be combined with a batch file
> to alleviate me from typing the same stuff over and over. (There
> remains the extra problem of changing xxx from run to run, but I might
> construct the batch file with a Mathematica command.) The other
> way of doing the same thing would be using Run:
> 
>      Run["wdw prog -linkmode listen -linkname nxxx"]
> 
> but if I do this, I can not connect to prog and the expression does not
> return, after I have started prog from the debugger (The breakpoints
> are far outside the link-establishing and interfacing stuff, they are
> only hit, if I call one of the to-be-tested MathLink-functions.)
> The Mathematica-Kernel can not be interrupted and I have to kill the kernel.
> 
> Any idea, how to do this better than above? Any idea, why
> Run[...] does not work here?


  • Prev by Date: Re: unix font problem
  • Next by Date: Re: Is it possible to start a perl executable from mathematica?
  • Previous by thread: Re: unix font problem
  • Next by thread: Re: Is it possible to start a perl executable from mathematica?