문제

I'm on an XP Virtual Machine running the GNU Visual Debugger 1.2.6, trying to open an Ada file (.adb), but keep getting the following error:

not in executable format: File format not recognized

I should also mention that I've installed both the Ada compiler kit and win32 tools for GNAT 3.14p.

I've since tried opening other .adb files from the GVD and even .c files, but all with the same happy response above.

Any idea why this is happening?

도움이 되었습니까?

해결책

GVD does not take a source file as an argument, it takes an executable program. Skipping a lot of if this and if that, to debug foo.adb you probably want to pass foo.exe to the debugger.

But this is Ada, and you shouldn't be here. ;-) If you got your source program to compile and produce an executable, you very seldom need to run the debugger. I can remember the last time I used the debugger with GNAT, and why. (A bug in Solaris, the workaround was change a constant to a variable--Solaris was overwriting the value passed in instead of using a temp.) But that was what? Five years ago?

It is much easier to put in some debugging code (see pragma Debug in the GNAT documentation), then run the program with the debug flag if necessary.

Oh, most important. You may need to look in C:\GNAT\2010\share\doc\ to find all the documentation that came with GNAT. Read it. Or at least figure out how to search it for what you need. ;-)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top