Sysprogs forums › Forums › VisualGDB › Breakpoint problem in IAR project
Tagged: VisualGDB IAR breakpoints
- This topic has 3 replies, 2 voices, and was last updated 4 years, 8 months ago by support.
-
AuthorPosts
-
March 31, 2020 at 14:07 #27794spirasParticipant
Hello, I used the wizart to import a IAR project in VS2017;
the project is setup to use IAR compiler;
the build succeeded and the target runs with JLink,
but breakpoints do not work.
There are some warnings I can’t figure how to fix:- Not in executable format: File format not recognized.
- No executable has been specified and target does not support determining executable automatically
- No symbol table is loaded. Use the “file” command
- Warning: could not set a breakpoint on main. ‘Step into new instance’ will not work
-gdb-version =thread-group-added,id="i1" GNU gdb (GDB) 8.0.1 Copyright (C) 2017 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-eabi". 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"... &"\"C:\\Users\\Public\\Projects\\ProvaErmesGDB\\VisualGDB\\Release\\ProvaErmesGDB.a\": not in executable format: File format not recognized\n" GNU gdb (GDB) 8.0.1 Copyright (C) 2017 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-eabi". 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 verbose on OK -gdb-set disassembly-flavor intel No symbol table is loaded. Use the "file" command. -gdb-set print demangle off OK target remote :51439 &"target remote :51439\n" Remote debugging using :51439 =thread-group-started,id="i1",pid="42000" &"warning: No executable has been specified and target does not support\ndetermining executable automatically. Try using the \"file\" command." &"\n" =thread-created,id="1",group-id="i1" 0x00017ee6 in ?? () *stopped,frame={addr="0x00017ee6",func="??",args=[]},thread-id="1",stopped-threads="all" OK info shared &"info shared\n" No shared libraries loaded at this time. OK mon reset &"mon reset\n" Resetting target OK load &"load\n" &"No executable file specified.\n" &"Use the \"file\" or \"exec-file\" command.\n" No executable file specified. Use the "file" or "exec-file" command. -data-evaluate-expression "sizeof(void *)" ^done,value="4" -data-evaluate-expression "sizeof(int)" ^done,value="4" -data-evaluate-expression "sizeof(short)" ^done,value="2" -data-evaluate-expression "sizeof(long)" ^done,value="4" -data-evaluate-expression "sizeof(long long)" ^done,value="8" -data-evaluate-expression "sizeof(char)" ^done,value="1" -data-evaluate-expression "sizeof(wchar_t)" No symbol table is loaded. Use the "file" command. -data-evaluate-expression "sizeof(float)" ^done,value="4" -data-evaluate-expression "sizeof(double)" ^done,value="8" -data-evaluate-expression "sizeof(long double)" ^done,value="8" info target &"info target\n" Remote serial target in gdb-specific protocol: Debugging a target over a serial line. OK -data-list-register-names ^done,register-names=["r0","r1","r2","r3","r4","r5","r6","r7","r8","r9","r10","r11","r12","sp","lr","pc","","","","","","","","","","xpsr","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","msp","psp","primask","basepri","faultmask","control","fpscr","s0","s1","s2","s3","s4","s5","s6","s7","s8","s9","s10","s11","s12","s13","s14","s15","s16","s17","s18","s19","s20","s21","s22","s23","s24","s25","s26","s27","s28","s29","s30","s31"] -data-list-register-values r-10 ^done,register-values=[{number="0",value="0x2002ff0c"},{number="1",value="0x00000002"},{number="2",value="0x2002ff12"},{number="3",value="0x00000000"},{number="4",value="0x2002ff98"},{number="5",value="0x20015e88"},{number="6",value="0x20007cc0"},{number="7",value="0x00000228"},{number="8",value="0x00000000"},{number="9",value="0x00000000"},{number="10",value="0x00000000"},{number="11",value="0x20015e88"},{number="12",value="0x0004708d"},{number="13",value="0x2002ff08"},{number="14",value="0x000470a7"},{number="15",value="0x00017ee6"},{number="25",value="0x21000000"},{number="91",value="0x1fff1a00"},{number="92",value="0x00000000"},{number="93",value="0x00000000"},{number="94",value="0x00000000"},{number="95",value="0x00000000"},{number="96",value="0x00000000"},{number="97",value="0x00000000"},{number="98",value="0x00000000"},{number="99",value="0x00000000"},{number="100",value="0x00000000"},{number="101",value="0x00000000"},{number="102",value="0x00000000"},{number="103",value="0x00000000"},{number="104",value="0x00000000"},{number="105",value="0x00000000"},{number="106",value="0x00000000"},{number="107",value="0x00000000"},{number="108",value="0x00000000"},{number="109",value="0x00000000"},{number="110",value="0x00000000"},{number="111",value="0x00000000"},{number="112",value="0x00000000"},{number="113",value="0x00000000"},{number="114",value="0x00000000"},{number="115",value="0x00000000"},{number="116",value="0x00000000"},{number="117",value="0x00000000"},{number="118",value="0x00000000"},{number="119",value="0x00000000"},{number="120",value="0x00000000"},{number="121",value="0x00000000"},{number="122",value="0x00000000"},{number="123",value="0x00000000"},{number="124",value="0x00000000"},{number="125",value="0x00000000"},{number="126",value="0x00000000"},{number="127",value="0x00000000"},{number="128",value="0x00000000"},{number="129",value="0x00000000"}] -break-insert -f C:/Users/Public/Projects/ermes4/src/Ermes.c:210 &"No symbol table is loaded. Use the \"file\" command.\n" ^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="<PENDING>",pending="C:/Users/Public/Projects/ermes4/src/Ermes.c:210",times="0",original-location="C:/Users/Public/Projects/ermes4/src/Ermes.c:210"} -data-evaluate-expression "sizeof($r0)" ^done,value="4" -data-evaluate-expression "sizeof($r1)" ^done,value="4" -file-list-exec-source-files ^done,files=[] -data-evaluate-expression "sizeof($r2)" ^done,value="4" -data-evaluate-expression "sizeof($r3)" ^done,value="4" -break-after 1 0 OK -data-evaluate-expression "sizeof($r4)" ^done,value="4" -data-evaluate-expression "sizeof($r5)" All created breakpoints are pending. Setting a breakpoint at main()... ^done,value="4" -break-insert -f main &"No symbol table is loaded. Use the \"file\" command.\n" ^done,bkpt={number="2",type="breakpoint",disp="keep",enabled="y",addr="<PENDING>",pending="main",times="0",original-location="main"} -data-evaluate-expression "sizeof($r6)" ^done,value="4" -data-evaluate-expression "&_estack" No symbol table is loaded. Use the "file" command. -data-evaluate-expression "&__StackLimit" No symbol table is loaded. Use the "file" command. -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"} Warning: could not set a breakpoint on main. 'Step into new instance' will not work. -break-delete 3 OK
- This topic was modified 4 years, 8 months ago by spiras.
March 31, 2020 at 16:29 #27796supportKeymasterHi,
It looks like you are trying to debug a static library:
&"\"C:\\Users\\Public\\Projects\\ProvaErmesGDB\\VisualGDB\\Release\\ProvaErmesGDB.a\": not in executable format: File format not recognized\n"
Please note that static libraries cannot be programmed or debugged directly. Instead, they need to be linked into an executable project, that could be programmed and debugged as expected.
You can switch between building a static library and an executable via VS Project Properties -> Configuration -> General (see this page for a detailed description of MSBuild property types).
March 31, 2020 at 17:46 #27800spirasParticipantThanks a lot!
don’t know why it ended up as a library
March 31, 2020 at 17:51 #27801supportKeymasterNo problem. VisualGDB would create a library project when it detects that the original IAR project was a static library. The check is done using the “GOutputBinary” element in the IAR project file.
Most likely, your project was created using an older version of IAR and our importing plugin doesn’t handle it properly. If you could attach the .ewp file here (or send it via our support form), we will be happy to update our importer to handle it properly. You don’t need to share any actual source code.
If you do not want to share the project file, you can also patch the IAR project importer on your side by cloning it from Github: https://github.com/sysprogs/BSPTools/tree/master/ProjectImporters/IARProjectImporter
-
AuthorPosts
- You must be logged in to reply to this topic.