I'm trying to debug a crash in my program running on cygwin. The program has been compiled and linked using visual studio 12 tools. A trial license for the full vs12 version has been installed so presumably we have access to the vs12 debugger. I've never used this before, I'm more familiar with command line tools in linux like gdb or lldb on osx. It doesn't seem that gdb is installed on our windows machines and I don't have admin access. I'd like to simply run a backtrace on the program at the point at which it fails. Can anyone give a quick start for using the debugging tools on cygwin/windows? I've tried the following
$devenv /debugexe /winsame/swsides/myexec 'program-options'
A microsoft visual studio window opens up, but again I'm not clear on where to start. It would be great if there was a simple command line interface.
Related
Recently, Intel released Ifort compiler for free, for everyone to use. As I have been using gfrotran for quite some time, I decided to install it. I installed the two packages that intel says they are needed (using Windows 10). In the console, as ifort was not recognised (I tried to set up the path to the executable ifort.exe to no avail), i decided to use intel one api tool console.
In that console, ifort is recognised, and you can acces help options and the likes. However, when I try to run a simple test program, it runs with fatal error LNK1104, where imageHlp.lib is missing.
I also tried to run it form the VS17 interface, but it was futile.
I don't know what I am doing wrong, and Intel support forums are in permanent "we are experiencing network issues".
I just want to compile a text file to an executable, no libraries involved, nothing fancy.
I am not seeing any issue with the Intel forums. Make sure you have configured VS2019 for the "C++ Desktop Workload" - see https://software.intel.com/content/www/us/en/develop/articles/installing-microsoft-visual-studio-2019-for-use-with-intel-compilers.html Or for VS2017, https://software.intel.com/en-us/articles/intel-c-fortran-compilers-for-windows-integration-into-microsoft-visual-studio-2017
After you have installed the oneAPI HPC Toolkit, there is a shortcut created Intel oneAPI > Intel oneAPI command prompt. Use this to establish the environment. But you will probably find that the default directory with that shortcut is C:\Program Files (x86)\Intel\oneAPI, which is unusable for compilation, so "cd" to a writable directory. (I like to copy that shortcut to my desktop and modify the "Start in" location.)
I installed both VS2013 and VS2015 Professional (full install), and both have a "armasm.exe" under the bin folder. I set the bin folder into "path" environment variable. When I tried "armasm /?" under cmd, it prompts out a dialog box with a red cross sign, saying that:
The application was unable to start correctly (0x000007b). Click OK to close the application.
I wonder if this program is for ARM CPU's assembly language. Does this program only run on ARM machine that installed VS?
How can I get it to run?
I assume you're talking about the armasm.exe file in the \VC\bin\x86_arm folder? If so, then no, that is an x86 binary, not an ARM binary. It will run on your machine.
It is actually an ARM cross-assembler for x86. That means it allows you to assemble ARM binaries on an x86 host. Think of it like the x64 cross-compiler for x86 (in the x86_amd64) folder. That can compile 64-bit binaries on a 32-bit x86 host.
The reason you can't get it to start is because the environment has not been set up correctly, and required dependencies cannot be located. When I try to start it, I get a more descriptive message than you do:
System Error:
The program can't start because msvcdis140.dll is missing from your computer. Try reinstalling the program to fix this problem.
You are meant to use the vcvarsx86_arm.bat batch file (in the same folder) to get your environment set up correctly, before trying to run any of the tools. Step-by-step:
Open a new Command Prompt.
Drag in vcvarsx86_arm.bat, and press Enter to run it. This sets up your environment to run the x86/ARM tools.
Drag in armasm.exe (or simply type armasm.exe into the prompt, unqualified). It will now run because the environment has been correctly set up (including the path, so that it can be found without requiring the full path to be entered).
There is also a \VC\bin\amd64_arm folder. This contains tools for ARM executables that run on x64 hosts. You use those in exactly the same way, except you launch the vcvarsamd64_arm.bat file in that folder first.
It is worth noting that I also see a \VC\bin\arm folder, but (at least in my install of VS 2015) that contains only one EXE: pgosweep.exe. Microsoft does not appear to provide an ARM assembler that runs on ARM platforms. Which makes senseāI don't think ARM is a supported host for development. Visual Studio certainly hasn't been ported to ARM. Just use the ARM tools on x86 or x64.
I am using Code Blocks 13.12. I am unable to run any program except hello word. The error i am getting is "Debug ERROR: You need to specify a debugger program in the debuggers's settings. (For MinGW compilers, it's 'gdb.exe' (without the quotes)) (For MSVC compilers, it's 'cdb.exe' (without the quotes))". Can anyone tell me how to solve this issue?
You can set the debugger for Code Blocks under Settings->Debugger->GDB/CDB Debugger->Default->Executable path. You will need either MinGW or MSCV (The community edition is free) installed.
I went to winpcap.org today, downloaded the installer, and installed WinPcap on my Windows 7 laptop PC. However, the folder where it was installed contains only an installation log, an executable called rpcapd.exe, and an uninstall executable. When I run rpcapd.exe a dos shell appears:
Press CTLR+C to stop the server...
and nothing happens until I press CTRL+C, which closes the window. When I create a project in Microsoft Visual Studio and include < pcap.h >, I'm told there is no such file or directory. A search of my computer yields no results. I've tried reinstalling a couple times but with no new results. What am I missing here?
Development with WinPcap requires both the driver install, as well as the developer's pack. Have you installed the developer's pack?
Is there a ruby visual debugger that i can run from the linux terminal?
And if so, how do i run it?
There are several graphical debuggers available for Ruby, e.g Mr. Guid, rudebug or the RubyMine IDE, the latter of which does not seem to quite fit your use case. ruby -r debug [script] runs on the command line but is also quite usable.