|
From: Christian K. <chr...@tu...> - 2006-07-28 08:31:15
|
Hi Rahul, >>From the documentation I understand that the error > indicates that an illegal memory location is being > accessed. But the above error message doesn't seem > to indicate which line in my code possibly caused the > problem. Is there any way I can get this or > some other information that will help me diagnose the > problem more specifically? Or is this already present > above and am I missing it? I'm not sure if you can get valgrind to help you diagnose this running Matlab. Somebody else might help you there. But what I did to debug my mex files is the following. I have the mexFunction just doing the interface part between C and Matlab and this calls a routine doing just the computational stuff. Now I put this computational routine into a normal C program and debug (valgrind) the code there. Of course it depends on the input to your routine if this works. For me it more or less simply boiled down to a main routine with some setup and a call to the computational routine. If the input is more complex, you might be able to generate some dummy input that already triggers the errors. Cheers, Christian -- Christian Keil /"\ Institute for Reliable Computing \ / ASCII Ribbon Campaign Hamburg University of Technology X against HTML email & vCards mail:c....@tu... / \ |