Comments on: Debugging C/C++ S-Functions https://blogs.mathworks.com/simulink/2012/12/06/debugging-cc-s-functions/?s_tid=feedtopost Guy Rouleau is an Application Engineer for MathWorks. He writes here about Simulink and other MathWorks tools used in Model-Based Design. Sat, 20 Oct 2018 21:30:16 +0000 hourly 1 https://wordpress.org/?v=6.2.2 By: Dzordz Klunej https://blogs.mathworks.com/simulink/2012/12/06/debugging-cc-s-functions/#comment-228143 Sat, 20 Oct 2018 21:30:16 +0000 https://blogs.mathworks.com/seth/?p=1665#comment-228143 @Guy, Thanks for your comment – I found the option but unfortunately it didn’t help. If you know any other possible reason, I would appreciate if you shared it.

]]>
By: Guy Rouleau https://blogs.mathworks.com/simulink/2012/12/06/debugging-cc-s-functions/#comment-227791 Mon, 08 Oct 2018 20:40:18 +0000 https://blogs.mathworks.com/seth/?p=1665#comment-227791 @Dzordz: When you do “Attach To Process”, in the window where you select MATLAB.exe, there is a dropdown with the “Native Code” option.

]]>
By: Dzordz Klunej https://blogs.mathworks.com/simulink/2012/12/06/debugging-cc-s-functions/#comment-227717 Sat, 06 Oct 2018 20:16:17 +0000 https://blogs.mathworks.com/seth/?p=1665#comment-227717 Dear S-function debuggers, I try to follow Guy’s instructions but I get the same message as it was already mentioned in the comment section: “The breakpoint will not currently be hit. No symbols have been loaded for this document.”
I’m using Matlab 2015a and Visual Studio 2015, there is no field called “Native Code” (or maybe I cannot find it) mentioned by Amjad Elshenawy. Is there any way to fix it? Thanks in advance for any suggestions!

]]>
By: Patrick https://blogs.mathworks.com/simulink/2012/12/06/debugging-cc-s-functions/#comment-196555 Thu, 09 Feb 2017 20:17:43 +0000 https://blogs.mathworks.com/seth/?p=1665#comment-196555 Hi Guy,
Thanks for the article. Is there a way to debug a sim running in Rapid Accelerator mode? I have a sim that will run just fine in Accelerator mode, but causes a SIGFPE (Floating Point Exception) error when running in raccel. Since raccel compiles the sim into a standalone program and runs it in a new thread (or process?), I’m having trouble figuring out how to get GDB to break on the exception.

Thanks!
Patrick

]]>
By: Guy Rouleau https://blogs.mathworks.com/simulink/2012/12/06/debugging-cc-s-functions/#comment-160554 Mon, 22 Feb 2016 21:13:30 +0000 https://blogs.mathworks.com/seth/?p=1665#comment-160554 @KaKa: I recommend avoiding having two separate S-Function exchanging varaibles. If you find a way to do so, the results might become undeterministic and difficult to interpret. I recommend using signal lines between the two S-Functions, or at least Data Store Memory blocks connected to the inputs and outputs of your blocks.

]]>
By: KaKa https://blogs.mathworks.com/simulink/2012/12/06/debugging-cc-s-functions/#comment-160479 Sun, 21 Feb 2016 12:11:06 +0000 https://blogs.mathworks.com/seth/?p=1665#comment-160479 Hi Guy Rouleau,
I have two S-function blocks, but I want to exchange variables between them, via external functions (.c, .h file), How I can do that? thank you!

]]>
By: Amjad Elshenawy https://blogs.mathworks.com/simulink/2012/12/06/debugging-cc-s-functions/#comment-155495 Wed, 13 Jan 2016 12:51:54 +0000 https://blogs.mathworks.com/seth/?p=1665#comment-155495 Regarding the error message “The breakpoint will not currently be hit. No symbols have been loaded for this document”, it was solved by going to “Attach to Prcess” and changing the “Attach to” field to be “Native Code” (MSVC++ 2013)

Best regards
Amjad

]]>
By: I am using MSVC++ 2010 express version and It's not working for me,, ..the symbols are not loaded . does it supports for express 2010 version?? https://blogs.mathworks.com/simulink/2012/12/06/debugging-cc-s-functions/#comment-149970 Tue, 17 Nov 2015 12:35:16 +0000 https://blogs.mathworks.com/seth/?p=1665#comment-149970 please reply

]]>
By: Brian Harries https://blogs.mathworks.com/simulink/2012/12/06/debugging-cc-s-functions/#comment-108415 Wed, 07 Jan 2015 03:08:57 +0000 https://blogs.mathworks.com/seth/?p=1665#comment-108415 Is there any way to debug using GDB on windows? I have been able to compile for GDB and I can set break points but I can not attach GDB to a Matlab process on windows. Any help would be greatly appreciated.

Thanks,
Brian

]]>
By: spaman https://blogs.mathworks.com/simulink/2012/12/06/debugging-cc-s-functions/#comment-66216 Tue, 13 May 2014 17:41:12 +0000 https://blogs.mathworks.com/seth/?p=1665#comment-66216 bravo sir

]]>