What is the best method of debugging go code in Windows?
https://stackoverflow.com/a/5514122/201618 states the GBD cannot be used as
Windows and ARM binaries do not contain DWARF debugging information and, as such, cannot be inspected with GDB.
https://stackoverflow.com/a/3405768/201618 implies that the best thing to do is just use fmt.Println
Is there a better current option? Is there a better planned future option?
In addition to GDB you can use Zeus. Also, take a look to comparison of IDEs for Google Go.
LiteIDE (https://github.com/visualfc/liteide) includes a build of GDB that works on Windows. When I experimented with Goclipse, I was able to point it to that GDB executable and debug applications just fine.
Delve supports windows and can be installed with the following command:
go get github.com/derekparker/delve/cmd/dlv
It has integration with code editors and IDEs such as VS code, Atom and IDEA. No Sublime Text support is available yet though!
Related
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.
assembly programming in Emacs how to?
I want Emacs to do following things
1. assembling
2. run the just before made program inside Emacs
3. debugging with watching flags and registers as like ollydbg or softice
4. decompile executable file for see what assembly codes are made by c
but I don't know how to do this
could somebody let me know ?
Which operating system (and machine architecture) are you using? I think that's quite essential information for questions about assembly programming.
I'll try to answer your four points anyway:
Just run your assembler (e.g. as) from M-x compile.
Run it from a shell buffer or from shell-command (bound to M-!).
Emacs' built-in graphical debugging support is started with M-x gdb. You may have to look for some external debugger support package if GDB is not suitable for your purposes.
For disassembling object code, I'd use GDB. But I think if you have the C sources, it would be better to compile them with the -S flag to see the assembly code emitted by the compiler instead of what can be reconstructed from the machine code.
Since you mention SoftICE, I'm assuming you're on windows.
(Good old times, by the way. If anybody ever used SoftICE on windows 9x, he/she will know what I mean :)
I don't use Emacs, but here's how to get started:
Get the tools you need to assemble your program (ie: at least, the assembler and the linker). On windows, the MASM package comes with everything you need : http://www.masm32.com/
Figure out wich commands you need to compile a simple hello world.
Configure Emacs so that it runs the above commands for you
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.
I'm in an Assembly class focusing on the intel 8086 architecture (all compiling / linking / execution comes from running DOS on win7 via DOS-Box).
I've finished programming the latest assignment, but as I have yet to program any program successfully the first time through, I am now stuck trying to debug my code.
I have visual studio 2010 and was wondering if there was some built in feature that would help me debug my assembly code, specifically, I'm looking to track the value of a variable.
Failing that, instructions pointing to a DOS-Box debugger (and instructions!) would be much appreciated. (I think I've been able to run codeview debug, but I couldn't figure out how to do what I was looking for).
You are generating 16-bit code, you have to break into a museum to find better tooling. Try Borland's, maybe the debugger included with Turbo C.
Yes, indeed, you can use the debugger in VS to examine pretty much everything. Irvine's site has a section specifically on using the debugger here. You can examine registers, use the watch window, etc. He also has a guide for highlighting asm keywords if you need that.
Edit: as Hans pointed out, if you are using 16-bit instead of 32-bit protected, you'll need different tools. There are several choices, listed here.
Borland's tools for DOS were called tasm, tlink, and tdebug.
For certain programs nothing beats the command line. Unfortunately, I have never seen good documentation or examples on how to write console applications that go beyond "Hello World". I'm interested in making console apps like Vim or Emacs. Well not exactly like Vim or Emacs but one that takes over the entire command prompt while it is in use and then after you exit it leaves no trace behind. I know that on Unix there is the curses library but for Windows? ...
PDCurses works on Win32.
I found List of Console Functions on msdn, PDCurses, and The Console Module.
You can certainly write that kind of application with Delphi, which has reasonable commandline support. People often overlook that Delphi can build any kind of Windows executable, not just GUI apps.
I don't know off-hand if the free 'Turbo' edition of Delphi has anything cobbled into it to PREVENT you from using it to build console apps - I would have thought it would be fine for this kind of thing.
There is a small but good tutorial on using C++ for the Windows console at www.benryves.com/tutorials/?t=winconsole&c=all going as far as coding a simple painting program.
You could also try Free Pascal. It is a free ((L)GPL) Object Pascal compiler which is compatible with the Delphi-compiler. It has an console-based IDE, which proves that you can make very good console-applications with it, and which you can use as an example.
If you want to use a graphical IDE to build your console-application, you can download the Lazarus IDE.
As a bonus your application will run on Windows (32/64 bit), Linux, Mac OS X, FreeBSD, Solaris etc...
In Windows or DOS, I used the conio library from Borland. It's very old but fine enough for a beginner like me.
As Robsoft says Delphi would be a good start. There is Turbo Delphi (Pascal based) or Turbo C++ both free editions.
web site here.
http://www.turboexplorer.com/
Check out some of the mono libs. They have a great one to parse command line arguments but can't remember the namespace.
Miguel just posted some terminal code as well.
For ncurses-like library/framework on Windows, I'll highly suggest to get your hand dirty with PDCurses.
If you trying/using C#, there's Curses-Sharp.
This is the best tool for it I've ever seen!!
1) Create any application using VB6 IDE
2) Convert it to Console Application, using THIS!