I am trying to load an elf file into some .gdb file.\
When running the gdb file from cmd (Windows 7 - 64b), everything seems to be ok.
The commands execute properly, and the elf is loaded into the SRAM of my board.
The problem is when the same gdb file is ran from Eclipse (the Automotive feature of Eclipse).
The error I get:
Error in sourced command file:
"binary.elf" is not an object file: File format not recognized.
Can you help me to figure out what the problem should be?
"binary.elf" is not an object file: File format not recognized
This error means that you've tried to do (an equivalent of) file binary.elf in a GDB that was not compiled with ELF support (i.e. into native Windows version of GDB). That obviously wouldn't work.
You need to set up Eclipse to use appropriate cross-GDB, i.e. GDB that runs on Windows but knows how to debug ELF files. As dbrank0 said, you need to use correct launch configuration in Eclipse.
Related
I am compiling a C project with a container using gcc and specific toolchain.
I mount my project locally under /opt/git/myProject to the home directory of my container and then I compile it /home/user/myProject.
When I debug using vscode, it tries to open a c file under the home directory of my localhost.
Is it possible to tell to gdb (or vscode) that in fact my source file linked to the bin being debugged is under /opt/git/myProject ?
Is it possible to tell to gdb
Yes: see documentation on how to do that.
I suspect that using set substitute-path /home/user/myProject /opt/git/myProject is what you want.
I've seen some other stakoverflow question like this one:
CLion Installation: Cmake compilers not found, GDB not found
But it's not quite the same problem.
My problem is that only my gdb.exe is not found by Clion. I can compile and run programs without problem, but when i need to debug the program tell me that only the debbuger is incorrect.
The problem is that my gbd.exe is present in my cygwin/bin folder
and i have it also in my PATH (system variable)
What i've done so far:
delete, shutdown and reinstall cygwin from scratch.
Install Netbeans and try to run with cygwin config (and debugger) -> everthing is working and i can debug my program. I also try to select it manualy.
So the real question is why Clion think my gdb is not present?
An how can i make it work?
Thank you for your help
Try to install GDB version 7.10.1
My settings:
Short answer: check what versions of gcc, g++ and gdb you have installed. They should be of the same major version.
Long answer:
Try to launch gdb.exe from cygwin terminal. You will probably get something like this (I'm using mingw64 from msys2 so folder will be different):
$ gdb
C:/msys64/mingw64/bin/gdb.exe: error while loading shared libraries: libgcc_s_seh-1.dll:
cannot open shared object file: No such file or directory
But you have gcc installed so you will have this DLL inside C:/msys64/mingw64/bin (in your case folder is different). The problem is that your gdb and gcc are of different major versions. I got this problem when installed mingw-w64-x86_64-gcc-7.3.0-2 with mingw-w64-x86_64-gdb-8.2.1-1. That's why gdb was not able to launch and CLion was not able to check GDB version thus outputting "Not found" error.
If this is the case - remove gdb and install it again. Now with correct major version (same as gcc). Since you're using cygwin, launch cygwin setup again, search for gdb package (don't forget to change view to full) and change version to be the same as gcc. Or, alternatively, you can change gcc version to be the same as gdb (in my case this wasn't possible).
I have installed swig on my mac and it works in the console just fine. If I type swig -verison in terminal it spits out the version. Eclipse keeps telling me that it can't find swig. I am using the liquidfun library http://google.github.io/liquidfun/SWIG/html/index.html and it told me to put this export SWIG_BIN=$("which" swig) in .bashrc, which I did. This enviroment variable registers through terminal as well. Eclipse STILL won't grab swig properly. What the hell?
Bash reads .bash_profile, .bash_login or .profile. I don't expect the Eclipse process to load such a file (although I could be wrong) nor the SWIG_BIN variable to augment its search path for executables, but if you launch Eclipse from the shell, it should inherit the shell's environment variables.
Try running swig from eclipse using a full absolute path (the one that "which" returns).
The eclipse.ini file can set some startup parameters but perhaps not the path. There might be other eclipse startup files.
Another possibility is to add swig's directory to the path in a login script. (To test that, log out and back in, then start eclipse.)
On ccl on mac os x 10.9 i am having a problem cretaing executables.
(save-application "/full/path/to/saved-app" :prepend-kernel t) double clicking the produced executable file enters on terminal showing very long errors starting with a one like error: problems loadiing bundle:can't determine class name and ending with the kernel debugger options.
On ccl on windows i simply define a function and do the same above to save executable, later i can double click the output file it runs and remembers my defined function, ccl on mac dont remember also when i save image and load it to kernel manually.
on the clisp side, it creates executable on my mac, and on some widows installations it creates executable but i cannot launch executable, it gives an error prompt window saying something like
application failed to start because libreadline6.dll not found.
restarting application may solve the problem
but don't.
What are the problems here, any solutions?
The message says that the DLL cannot be found.
So, unless the OS is lying to us (which I wouldn't put past it, alas) the solution is
locate libreadline6.dll
add that directory to PATH or move/copy/link libreadline6.dll to a directory which is in PATH
or run your new image with an augmented PATH (either by creating an application shortcut or by running from the command line PATH=/path/to/libreadline6.dll:$PATH /my/new/lisp/image)
What is the right setup to do this?
Currently when I enter mex -setup, the compiler list is empty.
I installed Visual C++ Express 2008 and Windows SDK, but the supported compilers list is still empty.
You need to manually configure the mexopts.bat file, so that your compiler is identified by the mex command. Here there is an example mexopts.bat file: http://www.playrec.co.uk/download/mexopts.bat - be sure to edit it to fit your system settings (path etc.). Also, you should put this file in the current folder when you compile the code, otherwise Matlab will use its default file.