Debugger tool for Kaa Application with Kaa C SDK - c

I need to try with debugging Kaa application by Kaa C SDK for Raspberry Pi.
For example: Cassandra data analytics demo.
1- Please, suggest to me the best debugger tool, and
2- How can I import and setup project with debugger tool.
Note: I can do it with simple way just put "printf" function and then seeing the result, But I need a debugger tool.

This question is not Kaa specific, as it is just a regular C application, so you can use any debugging tool you know.
The default debugging tool for Linux is GDB, though you can use any graphical GDB interface you like. For example, you can use KDbg, Emacs plugin, or any other C IDE. (Refer to you tool documentation for further instructions.)
To enable debugging, it is recommended to enable debug symbol generation in CMake and disable optimizations. This is done with -DCMAKE_BUILD_TYPE=Debug CMake flag.

Related

Debugging a code with a board simulator in Eclipse (no hardware)

I'm using Eclipse IDE for debugging a code with an STM32 microcontroller, and looking for a way to simulate the MCU board and not need to connect and use the actual micrcontroller, it is very helpful to run simple codes and testing.
I was using IAREW before and it is possible, it has an option for a simulator driver in the debugging tool and you can run and see the results normally as if the board is connected; i was wondering if it is also possible with Eclipse?
In the Eclipse Debugger -> Debug probe, there are only 3 options which are ST-Link(GDB), J-Link and ST-LINK(Open-OCD); i'm new to Eclipse and couldn't figure out if it could be possible somehow by modifying something with one of those options.
Update:
I have found a kind of a solution, to add an extension to include the IAR EW debugger inside eclipse:
http://eclipse-update.iar.com/plugin-manager-install.html
It is not a good solution as both IDEs need to be installed, and the project need to be created specifically for IAR to use its simulator, so it is not possible to create an STM32 project and use the IAR simulator for debugging.
Are there other solutions within eclipse, without using another IDE or an extesion?

Cross Compilation for C applications using Eclipse

I'm developing a java application which uses native code with JNI, so I developped a C shared library using Eclipse with the CDT plugin on Linux Redhat. Everything works fine since I can launch my java application and call the native methods without any problem. But my problem is, I need to compile my code on every platform (Linux, Windows, x86/x64). It's not a problem to get the libXXX.so file but I also need a .dll to run on Windows, except I can't just compile my code on it, I need a way to do that locally on Linux with Eclipse. So I am looking for some simple solutions to do that locally with Eclipse using cross compilation.
I've made some researches but I can't find a real tutorial to explain how to do that, each time people say to compile on the specified platform. So if someone could help me with this that would be great.
My configuration is : Linux RedHat, Eclipse Juno, CDT plugin 8.1
You need a Linux -> Windows cross compiler. The MinGW tools would do the job, but, last I checked, they only provide binary downloads to run on Windows (i.e. not a cross-compiler). There are some (old) instructions for building your own here.
The CodeBench compiler is probably exactly what you want, but it's not free (there is a free trial though). It's basically a professional build of the MinGW tools, and comes with it's own customized Eclipse so there's no fiddling about needed in that department.
A quick google also comes up with these tools on sourceforge, but I've not tried them.

Tools like PVS-Studio for static code analysis in C projects?

I'm looking for some alternatives to the PVS-Studio tool, in order to run some static code analysis in C projects. Do you guys have any suggestions?
You don't state what you need, nor platform (your nick suggests linux),
but I use(d) these in past with great impact on my code:
Cppcheck (great eclipse plugin integration, its cpp but It does actually support C99 - plugin is called cppcheclipse)
Sparse (can be inegrated into eclipse by using "external tools")
Splint (eclipse CDT has plugin)
Codan (internal part of eclipse)
Intel SSA (I believe this can be accessed from Intel Compaser or Parallel studio, both of which provide free non-commercial like license and official Intel eclipse integration plugin)
All of these can be integrated at the same time into eclipse (using plugins, "run external tools" ar internally) and provide real time checking and analysis within Eclipse CDT IDE for linux programmers.
If you want more, there is alsa awesome set of tools in Frama-C.
These are best free tools (not necessarily opensource or free for commercial use) for static analysis I know of and they really make nice synergy with eclipse.
Sorry for advertising eclipse btw, except for Codan tools, these are accessible by other means (cppcheck provides simple GUI I believe, and others are all accessible from shell).
You don't mention what features you're looking for, but you can check out Vigilant Sentry and see if it meets your needs. It does static analysis of C and C++ programs, and has a plugin system for developing your own custom checks.

Best gui for remote gdb [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I know this question has been brought up before but it was mostly in respect to gdb for a program running on the local machine.
I've had some success with eclipse-cdt but it only seems to work occasionally. Supposedly Insight was previously used to debug (this embedded x86 board) but it seems to be dead.
I only need C debugging not C++. If possible I would prefer to connect through gdbserver (as that is on the advice and I connect to it through the command line all the time) but if you think putting gdb or ssh on the device and using it through those is better please mention those solutions also.
P.S. The version of gdbserver on the device is 7.1 it would be nice if the solution can work with a compatible version of gdb but I might be able to install a different gdbserver version.
I'd recommend eclipse Indigo it has built-in support for remote debugging applications via gdbserver. I just don't know where the source code has to be located for it to work.
Sinec it uses the MI interface of gdb it should work as any other interface that interacts with gdb.
I recommend trying out Qt Creator. It's cross-platform, has pretty good "code insight" features, and is a hell of a lot lighter-weight than Eclipse. It is a full IDE, not just a debugger front-end. It does require a gdb built with python support (client only, I think), but does come with it in its cross-platform installer. It is definitely more geared to developing C++/Qt applications, but does support generic Makefile and CMake projects, and I use it as my everyday C IDE and debugger.
Depending on exactly what kind of remote target you're debugging, the answer to this question could vary a lot. If you're cross-debugging to a deeply embedded microcontroller target running an RTOS, your options are going to be more limited.
For Makefile-based projects, you want to use the "Generic Project" creation wizard, which by default adds all the source files under the specified directory to your project. It may take some manual work to maintain your project, if you want Qt Creator to "understand" things that you've specified in your Makefile like command-line include directories (go in your .includes file), command-line included headers (go in your .config file), and command-line symbol definitions (go in your .config file). The project file list and compile, deploy, and run commands can all be maintained from the GUI though.
How about using DDD? I haven't used it much to be honest, and there seems to be a way to do remote debugging using DDD http://www.gnu.org/s/ddd/manual/html_mono/ddd.html#Remote%20Program
Gdb itself has already built-in curses based pseudo gui. By default, it splits main screen on 2 windows. Upper window contains source code, lower window is command line interface. Also there are other modes allowing to show you register values and assembly. It works well over ssh, so if you can, copy gdb on your device and debug it over ssh. If not, everything above can be applied for debugging over gdbserver.
You can use NetBeans. NetBeans support remote debugging with gdb. Gdbserver support plug-in also exist. I don't test plug-in but remote debugging using ssh working well.
Try Affinic Debugger GUI. It has newer design.
DDD is too old, Affinic Debugger supports all major platforms and is more powerful than DDD.

What windows C IDE can I use that will use gcc to compile and let me insert breakpoints just like Visual Studio would for C#?

What windows C IDE can I use that will use gcc to compile and let me insert breakpoints just like Visual Studio would for C#?
I have searched Google and cannot find anything more recent that 2005.
I'm just getting back into C since graduating and would like a non MS IDE that uses GCC, but that's a versatile as Visual Studio.
The thought of having to use GDB command line is not too appealing right now.
I successfully used Eclipse with C/C++ plugin. Matter of fact I prefer it to VS. You can download it from here it's a real beaut. If you do JNI it's simply indispensable since you can setup your project to do both C/C++ and Java
Dev-C++ http://www.bloodshed.net/devcpp.html
GPL license
Uses GCC
Netbeans http://www.netbeans.org/features/cpp/index.html
Code::Blocks is another free C++ IDE for Windows/Linux/MacOSX. GPL3 license.
I highly recommend Insight Debugger that is a lightweight Tk frontend to GDB by RedHat.
It adds a convenient GUI to call stack display, breakpoints, watches and memory display (non exhaustive list).
As it is in Tk, it both supports GNU/Linux and Windows (and probably MacOS X). For MinGW users, there is even a MinGW package to install it.
Once installed, you just add the -w setting to the command line to start the GUI: gdb -w
ddd
you could found it on the "development" menu.

Resources