I have tried various front-ends for gdb but I did not notice in any of them an option to interact with gdb directly (issuing CLI commands).
Is there a gdb front-end which supports this? I am mainly interested in memory examining functionality.
Eclipse is of course much more than GDB front-end, but it does provide a console view, where you can interact with GDB directly.
It also provides (at least) two different memory views, plus third party plug-ins that allow you to examine "bare metal" peripheral registers - if this is what you want to do.
You can do all this with Eclipse for C/C++ developers. There is now also a standalone debugger build of Eclipse which I did not try yet, but should be lighter version of above focused only on debugging.
Once you start Eclipse (for which you will need Java 7) you will need to create a launch configuration for C/C++ application, then launch it in Eclipse.
Or even better import you project into eclipse and create launch configuration for that project.
Related
Given that ZeroBrane is all written in Lua, can it be actually started from within a Lua environment?
The main motivation would be to fully integrate it inside an existing application (running within the same thread), being able to debug locally using all the exposed C/C++ functionality.
I realize I would have to match the architecture of the clibs used by ZeroBrane with the one used in the host application. So for example, if the host app is running LuaJIT 64-bit I would then require wx.dll compiled against the same LuaJIT binaries.
Will there be any other hurdles or limitations when trying to do this?
Given that ZeroBrane is all written in Lua, can it be actually started from within a Lua environment?
The answer to this question is definitely "yes", as this is what ZeroBrane actually does. For example, on Windows it launches itself by loading src/main.lua and executing it; this code can be seen in win32_starter.c.
Will there be any other hurdles or limitations when trying to do this?
I think the issue you're likely to run into is that it's difficult to debug a single-threaded application from itself (not impossible though). This is why normally the IDE (and its debugger) is launched as a separate process that interacts with the application that's being debugged over socket. You may want to check debugger.lua, which may be closer to what you're looking for.
I would like to use the EmmyLua plugin in IntelliJ: https://plugins.jetbrains.com/plugin/9768-emmylua
Most important for me is the ability to debug. Unfortunately the docs are in chinese (well at least google translate recognizes the characters as chinese).
How do I attach a debugger?
(please don't recommend alternative tools. I have ZeroBrane up and running on a different PC, it works quite nicely. But on this machine, the choice of software is constrained)
If possible, I would like to use the same featureset as is exposed with ZeroBrane and mobdebug, e.g. adding breakpoints in code, stepping through the code, inspecting variables.
I use IntelliJ 2021.1 and EmmyLua plugin 1.3.6. EmmyLua provides the debug configuration Lua Remote(Mobdebug) which works fine for me.
I have a custom CLI debugger for which I'm interested in a GUI. The debugger exposes an API with simple functions such as GetMemory(), SetMemory(), GetRegister(), Run(), Stop(), Address2Line() etc. through a TCP socket using a very simple protocol.
I'm looking for the easiest, fastest way of connecting it to a GUI. It seems there are many very good graphical debuggers, so after some research I think these are my best options:
Write a GDB translator - that will act as a gdbserver on one hand, translating all requests for the debugger, and also translate all events from the debugger to gdb compatible events. Then I can use any of the many gdb front-ends.
Write a Visual Studio Debug Engine
Write a plug-in for Eclipse (or some other open IDE)
Write a fresh GUI myself
So which will take the least effort / time ? Is there another way? Is there maybe a graphical debugger where I can easily define custom functions for debugging?
I would write an adapter so you can interact with something standard like GDB or Eclipse. Writing custom GUI code would be a waste of effort
We have created C&C++ applications based on Aix 6.1 (fortran for some models).
To improve our productivity (we use emacs or vi as editor, xlc/xlC/xlf as compiler, dbx to debug, IBM Synergy as configuration management tool), we are looking for an windows IDE to allow:
to modify our source code more easily,
to compile as if we are under unix
We also are logging for a graphical debugger.
Thank you for some ideas
I think that Emacs has been ported to Windows. And also GCC and Gnu make.
I've had some success with remote developing for AIX/Unix on Windows via a couple of routes.
Eclipse has some options. You can "mount" your project via ssh/rcp, and it will run the compiler remotely capturing the output. I did't attempt debugging but I assume support is there as well, especially if you use gdb.
BVRDE is another option. Works nicely. This link is also valid.
I also worked with XBuildStudio, it has some similar features to BVRDE.
Give them a try and see if any of them work for you.
Eclipse is a good one, but personally I prefer Codeblocks with Fortran plugin.
Use a text UI library. The Curses library used to be a popular option, but it is limited by copyrights.
Fortunately, there is an uncopyrighted version available.
This is called the "Console" mode.
Depending on your development environment and language of choice, it can be as simple as Ctrl+Shift+N, "Console Project" (in Visual Studio), or tweaking compiler flags (for C++). Every IDE/language provide a way to do this.
In Windows, the Console operates in two ways. Firstly, any project can create, attach to, and modify any number of console windows whenever it wants. Secondly, with a special flag in the EXE, the project will start up already attached to a console.
The latter operates subtly differently from the former. If you want a "normal" console application, I strongly suggest against creating and attaching to consoles. Just use the Console mode compiler setting.
Clipper was a popular way to do this in DOS.
I guess this is an old Clipper program. I so, there is still active support and even GUI libraries. I suggest you try xharbour. It's not DOS anymore but pure windows based. There is a free version and a pay version (visual xHarbour). With this tool you can even access SQL databases and it's 100% clipper compatible.