Sysprogs forums › Forums › VisualGDB › Warning: could not set a breakpoint on main. 'Step into new instance'
- This topic has 3 replies, 2 voices, and was last updated 7 years, 2 months ago by
support.
-
AuthorPosts
-
March 18, 2018 at 22:16 #20461
xox
ParticipantIntro:
I have checked out multiple posts to this topic already, but I could not find the solution that is why I am writing now.
Problem:
My break points stay unresolved.
Setup:I am using the cross compiling setting: That means I am building on my Win10 with Visual Studio 17 and the deploy the program on the pi model 3
Settings:
CFLAGS/CXXFLAGS: -std=gnu++14 -ggdb -ffunction-sections -O0 -mfloat-abi=hard
GDB Output:
-gdb-version
=thread-group-added,id=”i1″
GNU gdb (Raspbian 7.12-6) 7.12.0.20161007-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type “show copying”
and “show warranty” for details.
This GDB was configured as “–host=i686-w64-mingw32 –target=arm-linux-gnueabihf”.
Type “show configuration” for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type “help”.
Type “apropos word” to search for commands related to “word”…
&”LandshipsPlusPlus: No such file or directory.\n”
GNU gdb (Raspbian 7.12-6) 7.12.0.20161007-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type “show copying”
and “show warranty” for details.
This GDB was configured as “–host=i686-w64-mingw32 –target=arm-linux-gnueabihf”.
Type “show configuration” for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type “help”.
Type “apropos word” to search for commands related to “word”.
OK
-list-features
^done,features=[“frozen-varobjs”,”pending-breakpoints”,”thread-info”,”data-read-memory-bytes”,”breakpoint-notifications”,”ada-task-info”,”language-option”,”info-gdb-mi-command”,”undefined-command-error-code”,”exec-run-start-option”]
-gdb-set disassembly-flavor intel
No symbol table is loaded. Use the “file” command.
-gdb-set print demangle off
OK
-break-insert -f main
&”No symbol table is loaded. Use the \”file\” command.\n”
^done,bkpt={number=”1″,type=”breakpoint”,disp=”keep”,enabled=”y”,addr=”<PENDING>”,pending=”main”,times=”0″,original-location=”main”}
Warning: could not set a breakpoint on main. ‘Step into new instance’ will not work.
-break-delete 1
OK
-gdb-set solib-search-path I:/Y2017C-Y1-PR-Team07/Code/LandshipsPlusPlus/CrossCompiling
OK
-gdb-show sysroot
^done,value=”a:\\sysgcc\\raspberry\\arm-linux-gnueabihf\\sysroot”
-gdb-show debug-file-directory
^done,value=”c:\\q\\gnu\\raspberry\\out\\lib\\debug”
-gdb-set debug-file-directory a:/sysgcc/raspberry/arm-linux-gnueabihf/sysroot/usr/lib/debug
OK
-target-select remote 192.168.137.122:2000
=thread-group-started,id=”i1″,pid=”3127″
=thread-created,id=”1″,group-id=”i1″
&”warning: Could not load vsyscall page because no executable was specified\n”
0x76fce9e0 in ?? ()
*stopped,frame={addr=”0x76fce9e0″,func=”??”,args=[]},thread-id=”1″,stopped-threads=”all”,core=”2″
^connected
info shared
&”info shared\n”
No shared libraries loaded at this time.
OK
info target
&”info target\n”
Remote serial target in gdb-specific protocol:
Debugging a target over a serial line.
OK
-break-insert -f LandshipsPlusPlus.cpp:75
&”No symbol table is loaded. Use the \”file\” command.\n”
^done,bkpt={number=”2″,type=”breakpoint”,disp=”keep”,enabled=”y”,addr=”<PENDING>”,pending=”LandshipsPlusPlus.cpp:75″,times=”0″,original-location=”LandshipsPlusPlus.cpp:75″}
-file-list-exec-source-files
^done,files=[]
-break-after 2 0
OK
All created breakpoints are pending. Setting a breakpoint at main()…
-break-insert -f main
&”No symbol table is loaded. Use the \”file\” command.\n”
^done,bkpt={number=”3″,type=”breakpoint”,disp=”keep”,enabled=”y”,addr=”<PENDING>”,pending=”main”,times=”0″,original-location=”main”}
-exec-continue
^running
*running,thread-id=”all”info sources
info sources
&”info sources\n”
&”No symbol table is loaded. Use the \”file\” command.\n”Resolve Breakpoints
The current loaded GDB symbols have no record of any file called […]Additional Information
I have separated project (new) there it works everything fine. This project was originally a project which were building on the pi.
I hope you can help me or give me the right advice. Thank you very much.
March 19, 2018 at 00:14 #20462support
KeymasterHi,
Looks like your project is built without debugging symbols. Please ensure you specify the “-ggdb” flag in the CFLAGS/CXXFLAGS.
March 19, 2018 at 09:47 #20466xox
ParticipantHey thanks for the quick answer but as I mentioned in my initial post:
Intro:
I have checked out multiple posts to this topic already, but I could not find the solution that is why I am writing now.
Problem:
My break points stay unresolved.
Setup:I am using the cross compiling setting: That means I am building on my Win10 with Visual Studio 17 and the deploy the program on the pi model 3
Settings:
CFLAGS/CXXFLAGS: -std=gnu++14 -ggdb -ffunction-sections -O0 -mfloat-abi=hard
I have this flag there as u see here: CFLAGS/CXXFLAGS: -std=gnu++14 -ggdb –
March 19, 2018 at 19:01 #20472support
KeymasterHi,
Sorry for the confusion. If the -ggdb flag is present, the debug symbols could be accidentally removed from the final executable by using the ‘strip’ command. We have published a detailed tutorial showing how to diagnose symbol-related problems here: https://visualgdb.com/tutorials/linux/symbols/
Please feel free to follow it and let us know if you have any questions. If you are using a cross-compiler, the equivalent of the objdump tool is arm-linux-gnueabihf-objdump.exe (you would need to search its output for “.debug_xxx” sections manually as grep is not available on Windows unless you have Cygwin installed).
-
AuthorPosts
- You must be logged in to reply to this topic.