access gdb variables from matlab
Show older comments
Dear community, does anyone know how to access gdb (gnu debugger) memory space from matlab, while debugging external C/C++ code? Best Regards Mikhail
Accepted Answer
More Answers (1)
José-Luis
on 6 Sep 2016
0 votes
4 Comments
Not that I know of. I have difficulties seeing how involving Matlab to debug a C++ program is a good idea though.
As you mention: What's wrong with writing a helper function that will dump your array to a text file? You could even directly write to a .mat file using the C++ API.
Maybe something like loading libgdb.a with loadlibrary() could provide the functionality you want. Disclaimer: No idea if it'd work since I've never tested it for that. It's just what popped to mind and it'd be nice to hear if it works if you test it.
The comparison to writing code directly in C++ compared to Matlab is not a fair one, IMO.
My point is that there are already tools out there that interact with gdb. Although I understand the convenience of having everything under one roof, I'm still not a fan of the idea. GNU DDD looks nice for what it's worth.
Categories
Find more on Logical in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!