Is there a way to debug VC++ compiled applications using Eclipse/WinDbg? - c

I'm currently using Eclipse as my main editor, and source browser for our C/C++ project. The only problem is, I have to switch to Visual C++ everytime I have to debug or trace. Is there a way to have Eclipse use the WinDbg tool to debug Windows native applications? I tried searching on the web but all the forum posts seem to trail off to nowhere around 2007/2008.

I think the answer is no. Because you will not have access to the Win Debug Symbols and libraries within the Eclipse runtime. However you could start building this as an Eclipse plugin for VS users.

Related

Debugging OpenFX plugins

I am creating a visual effects plug-in using OpenFX.
I have followed the programming guides from the official documentation.
However, I didn't find anything relating to debugging of OpenFX plugins.
I am looking for some specific methods for debugging my plug-in. I am currently using Natron / DaVinci Resolve as host applications.
Currently I have tried (I am running on Mac) to ``Attach to process'' via lldb or Xcode to e.g. DaVinci Resolve. Both results in an error or lost connection.
It depends on your IDE. With Visual Studio, for example, in your Solution used to build your plug-in you can set the "executable to run" as the host application. Then when you debug your plug-in, it will launch the host application under the debugger. Once the host has loaded your plug-in, your breakpoints become active (and new ones can be set) and will be hit when the host makes calls into your plug-in. You'll get source level debugging for your plug-in, but unless you have symbols the host items in the stack trace will just be hex.
Edit: I just noticed you said you're on a Mac. In Xcode, edit your Scheme. In Run/Debug you can set the Executable. As above, pick the host application. When you tell Xcode to "Run" your plug-in, it should launch the host.

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.

Debugging in QtCreator 5 using Mingw+Gdb on Windows?

I have been looking for a solution for hours. I have QTC 5, Mingw and Gdb under Windows7. I can compile and run my project however I have not been able to figure out how to debug and create a debug configuration in QT 5 under Windows. Bear in mind that everything works as it should in this IDE. I am happy with it just that I have not been able to figure out debugging with this particular configuration.
Most tutorials were concerned with CDB or Qt project or in other platforms, or were talking about some tabs or menus that are not available in v5 as far as I can tell.
What is the right way of setting up a debug configuration and running my .exe in a debug environment using QT 5 and Gdb? My project is mostly C and some C++ with no Qt component. I am just using it as an IDE for C/C++.
thanks

WinSDK 7.1: Getting Started with the Windows SDK Tools for Native Windows app development?

I finally was able to successfully install the Windows SDK tools (v.7.1) on my Windows Vista system. I already had the GCC compiler installed and that is what I currently use to compile C code.
Where do I find the documentation for the WinSDK and how should I go about including it in GCC?
I couldn't find any explanations in the release notes or anything. However, if you can find something that explains it, feel free to give me a link.
This might sound weird to you, but you didn't need to download any separate Windows SDK to develop for Windows, because Visual Studio, and MingW/GCC, and others, already commonly include all that most people would need. (Some people would say, that Visual Studio and other tools, ship with their own version of the SDK, but I think that's merely confusing the issue further.)
You need Visual Studio first. And maybe, some day later, you might want to add the Windows SDK add on to it, but it is not intended to be used by itself, or in combination with GCC.
Basically, some of the SDK content duplicates stuff that is already included in Visual C++ and Visual Studio and some of it is additional tools like WinDbg.
Let me explain. The Windows SDK is indeed, useful for doing certain things in Windows that beginners are unlikely to need to do. For example, if you need to integrate with some specialized APIs, the Windows SDK contains a lot of documentation, examples, and a more complete set of header files that weren't included in Visual Studio because they're less frequently used APIs. The core API headers and documentation for Windows are already in Visual Studio, so technically, Visual Studio already contains the core SDK, and the so called SDK is an "auxiliary SDK", or a "low level SDK for purists, advanced users, and certain kinds of systems or native-level programming", but not needed, for most typical end-user applications development.
But if you want to learn Win32 native programming using C or C++, or you just want to write native Windows applications you PROBABLY don't need anything that comes in the SDK, and even then you need Visual Studio first, and the SDK second. Let me explain:
Many tools that let you write pure native Windows applications, provide higher level APIs, including Visual Studio, which gives you MFC or ATL. None of those tools need the SDK to work. The SDK, so called, is more of a "extra crap that we don't ship with visual studio because hardly anybody needs it", which Microsoft abbreviated to SDK. I know. Weird.
You don't need the SDK at all if you intend to use GCC. If you want to write an application for Windows in bare C or bare C++, you can just install mingw if you insist on using gcc and working from the command line.
The normal way to write native applications is to use the free Microsoft Visual C++ Express edition, and you can use it to write either C or C++ apps, and it includes the header files and libraries you need to write almost any native windows application feature you need, without any need for the SDK. Visual Studio is a nice modern IDE, and lots of convenient cool features like code completion and so on. The SDK you downloaded doesn't contain any of that.
Anything you do need to know about the raw Win32 APIs you can learn using the Web format of the MSDN documentation, or the help in Visual Studio. The basic Windows APIs like WinCreateWindow, are documented already in the Visual Studio help and MSDN help, and you don't need the SDK docs for most of the core windows APIs.
If you're just getting started, can I suggest you should just go get the free (but not open source) Visual Studio 2010 Express. That's the recommended way to get started, not the SDK.
I'm quite sure that the Windows 7 SDK that you downloaded is not intended for use with GCC anyways, and if you need a version of windows header files that work with a Gnu C/C++ compiler, any basic Win32 APIs like GDI and the basic Windowing API stuff is already bundled in mingw version of gcc.
You might also want to know about the DDK, which is like the SDK but which is oriented towards Device Driver and native NT-mode development.

Eclipse Plugin To Read Breakpoint Information

I'm working with a legacy embedded debugging tool and it's frustrating to work with. I just found out however that it can be automated in many ways, such at setting breakpoints on start up.
Since I use eclipse cdt as my development environment, I was wondering if I could write an eclipse plugin that reads all my breakpoints so I can generate a script in my debugging tools proprietary language and then launch the debugger. This way I can set breakpoints in eclipse and have them load up in my debugger when ever I need them.
Right-click in the breakpoint view and select "Export breakpoints..."

Resources