I am working on a Hybrid App (Web UI with Native Service) of API version 4.0 for my Gear S3 Frontier. After successful compilation of the App, In order to track the cause of application crash, when I launch it on emulator W-4.0-circle-x86-preview in debug mode, it gives an error message.
Error Message:
Cannot launch application with GDBClient.
Error in final launch sequence
Failed to execute MI command:
source G:\Computer Science\App Development\MyApp\GalaxyWatchApp\MyApp\Native Service\Debug\.gdbcommand
Error message from debugger back end:
G:\Computer Science\App Development\MyApp\GalaxyWatchApp\MyApp\Native Service\Debug\.gdbcommand:5: Error in sourced command file:\nG:Computer ScienceApp DevelopmentMyAppGalaxyWatchAppMyAppNative ServiceDebugMyAppservice: No such file or directory.
G:\Computer Science\App Development\MyApp\GalaxyWatchApp\MyApp\Native Service\Debug\.gdbcommand:5: Error in sourced command file:\nG:Computer ScienceApp DevelopmentMyAppGalaxyWatchAppMyAppNative ServiceDebugMyAppservice: No such file or directory.
GDBCommand File Contents:
set sysroot C:\Tizen\TizenStudio\tizen-studio\platforms\tizen-4.0\wearable\rootstraps\wearable-4.0-emulator.core
set debug-file-directory C:\Tizen\TizenStudio\tizen-studio\platforms\tizen-4.0\wearable\rootstraps\wearable-4.0-emulator.core\usr\lib\debug
set solib-search-path G:\Computer Science\App Development\MyApp\GalaxyWatchApp\MyApp\Native Service\Debug
dir C:\Tizen\TizenStudio\tizen-studio\platforms\tizen-4.0\wearable\rootstraps\wearable-4.0-emulator.core\usr\src\debug
file "G:\Computer Science\App Development\MyApp\GalaxyWatchApp\MyApp\Native Service\Debug\MyAppservice"
sharedlibrary
During the web search I found some of the GDBClient errors but couldn't find the solution to this one.
I've also tried setting the path of GDB Debugger to i386-linux-gnueabi-gdb-7.8 and GDB Command File to the absolute path of .gdbcommand which should be run.
It seems like the problem lies with this line:
file "G:\Computer Science\App Development\MyApp\GalaxyWatchApp\MyApp\Native Service\Debug\MyAppservice"
Try to remove spaces from the directory name. Change Computer Science to something like Computer_Science and App_Development to App_Development. Then right-click on your project and go to Debug As -> Debug Configurations..., then delete the active debug configuration and again create new one.
You may also try by removing the whole line file "G:\Computer Science\App Development\MyApp\GalaxyWatchApp\MyApp\Native Service\Debug\MyAppservice" from the .gdbcommand file manually and check if it fixes the issue.
Related
I downloaded the latest version of the C++ ide from eclipse called oxygen. I am trying to do a basic debug test with an application on windows 10 but get this error message:
Error in final launch sequence
Failed to execute MI command:
-file-exec-and-symbols C:/Users/Owner/eclipse-workspace/Hello/Debug/Hello.exe
Error message from debugger back end:
"C:/Users/Owner/eclipse-workspace/Hello/Debug/Hello.exe": not in executable format: File format not recognized
"C:/Users/Owner/eclipse-workspace/Hello/Debug/Hello.exe": not in executable format: File format not recognized
I added the path to the gdb executable in the mingw folder but I am still getting that error message.
I am trying to put the gdb to run with eclipse cdt on ubuntu to start debugging some simple programs. So I did the steps I reckon as necessary to get it running:
1. Create an executable project
2. Compile
3. Run
4. Create the file .gdbinit and place it on the main project folder
5. Set some of the debugger configuration:
5. I also tried to find a .gdbinit file that would look some like this:
set schedule-multiple
dir ~/gcc_build/4.7.2/build/gcc
dir ~/gcc_build/4.7.2/gcc
dir ~/gcc_build/4.7.2/gcc/cp
dir ~/gcc_build/4.7.2/gcc/lto
source ~/gcc_build/4.7.2/build/gcc/gdbinit.in
But I didn't find anything similar in my computer, even after doing a:
# find / -name .gdbinit
So, my file .gdbinit end up with the simple content - yes only that:
set new-console on
Then I clicked on Apply and Debug:
The gdb starts working nicely as expected. I press the button "step over / F6" and the debugger goes jumping through the code step by step. Until the point it reaches the command rand() and the gdb hangs with the message:
Can't find a source file at "/build/buildd/eglibc-2.19/stdlib/rand.c"
Locate the file or edit the source lookup path to include its location.
Thus I also tried unsuccessfully to find the rand.c to update this path to include its location:
# find / -name rand.c
# find / -name stdlib
After the error message from GDB complaining that rand.c is missing, then I tried to keep stepping... since then the stepping mode is disable when I restart the debug:
Is this problem happening because some setting for my file .gdbinit is missing? Or some how GDB is not able to find the rand.c from stdlib from c99? When I compile and run the program it runs nicely. Only when I try to launch the debugger is when GDB crashes.
Update: I got the missing rand.c problem after running the commands:
# apt-get install libc6-dbg
# apt-get source libc6
But now a different error appears:
Can't find a source file at "/build/buildd/eglibc-2.19/csu/libc-start.c"
Locate the file or edit the source lookup path to include its location.
Should I also install that library for gdb?
All suggestions are highly appreciated.
From what I saw on your description... looking to the 4th and 5th image you posted, you did right all the required steps.
However, it seems to me that your GDB is attached to several projects. That means that unless you really need that, I would strongly advise you to select all project that you are not currently debugging and delete them from the debugger mode. So, my suggestion is that after you have done all the steps you did so far, then go on:
Debug Configurations > C/C++ Applications: (drop down it)
... then click on each project you are not compiling, with right button from the mouse select "delete" - but don't worry, it will not delete your project, but only the attachment of that project to your debugger mode.
Then restart the eclipse. When you again try to run in the debugger mode, everything will run much smoother than before.
Step1:
Go to https://www.gnu.org/software/libc/ to download glibc.
Step2:
unzip it locally and whenever the eclipse prompts "Can't find ... xxx.c", just load the file into eclipse. It will work.
When I run program in GDB/CentOS, I see following message in console:
warning: File "/usr/lib64/libstdc++.so.6.0.18-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
I do exactly what this warning says. I create file /home/user/.gdbinit with the only line add-auto-load-safe-path /usr/lib64/libstdc++.so.6.0.18-gdb.py. Nothing changed. I see the same error message even after restart.
Are there any ideas what is problem?
From the gdb docs:
set auto-load safe-path [directories]
Set the list of directories (and their subdirectories) trusted for automatic loading and execution of scripts.
This is to specifiy directories, but you specify a file:
add-auto-load-safe-path /usr/lib64/libstdc++.so.6.0.18-gdb.py
You might want to do:
add-auto-load-safe-path /usr/lib64/
I'm using Xming to connect to a Linux (enterprise edition) server on which I'm trying to debug a C++ project in Eclipse Galileo. The following errors occurred:
Reading symbols from ../workspace/myfile ..(no debugging symbols found) ... done.
.gdbinit : No such file or directory
Setting environment variable "LS_COLORS " to null value
(.gdbinit is on the server (in root), my account has rights)
If i try to run gmake on the same file from the terminal I get the following error :
gmake ** No rule to make target /workspace/myfile' . Stop.
//I have exported the path (including the library path), and gmake exists.
My project has 3 subprojects (proj1 , proj2 and proj 3). In order to debug proj3 I have to build projs 1 and 2 . I created make targets for projects 1 and 2, and I obtained .so files for which i made softlinks to corresponding files in my_project/libs folder.
My Eclipse debug configuration is as follows (tab order):
Main
Project: My Project
Build Configuration: UseActive
C++ Application: path to my project/myproject
Environment: path to libs on server (my user rights)
Debugger
Debugger: gdb/mi
(Checked) Stop startup at main
GDB debugger: gdb
GDB command line .gdbinit
GDB command set: standard
Protocol mi
Project Properties:
Builders CDT Builder
Scanner Configuration Builder
C/C++ Build
Build command gmake -k
Behaviour
build incremental build : all ( sometimes i get the error no rule for make all)
Clean: clean
Discovery options:
(Checked) Automatic discovery path
(checked) Report path detection problems
Discovery profile GCC per project
(checked ) Enable build output
Compile invocation comand gcc
Toolchain
No toolchain
Correct builder GNU make builder
This Eclipse debug configuration works on another account (on the same server using the same Eclipse). The gdbinit and gmake files are on the server and work, I'm not supposed to update the versions (this was one solution I found online).
Has anyone seen this error before? Does anyone have a clue what I'm doing wrong?
I'd like to debug to debug a remote application with GDB.
My target system is a FreeBSD 8.3 box with gdbserver running. The application has been compiled successfully on that box. My Eclipse CDT 4.2 runs on Windows 7 with recent MinGW installed.
This is an external program I'd like to debug. It is neither written by me nor I do have it as a library. I do not intend to write my own program. In this case it is Subversion 1.8.0-dev which I want to debug.
I have created a simple C project, attached the source of Subversion. Created a remote debug config and attached the sources to the running thread in gdbserver.
Now, eclipse enters the main function of Subversion but when I set a breakpoint in another attached source file, Eclipse says: No source file named ra_loader.c or it simply says "No source available".
Then It simply exists the application.
What am I missing here?
Try the suggestion made on this thread
Quote :
1) run a debug session and open the gdb console inside Eclipse
('Console' tab -> 'Display Selected Console' button -> choose the one
ending with 'gdb')
2) use command 'pwd' in the console to print
gdb's current working dir
3) use command 'info line main' to get
the source file where gdb expect to find of my "int main(...)"
function
4) concatenate the result of step 2 with result of step
3 (which should be a relative path) to see if it matches the
correct source file I want
5) use the 'cd' command in gdb (to
change the current working dir) till I get the correct match in
step 4
Knowing the initial working directory (2) and the correct working directory (5) for gdb , I had 2 options: 1) Use gdb's 'cd'
command every time I launch a debug session (I could setup a
.gdbinit file in the gdb initial working directory to do this
automatically) or 2) Setup the 'Source' tab, in 'Debug
Configurations', to make Eclipse use paths that match with gdb's
initial working dir ('Project - Path Relative to Source Folders'
worked for me)