Closed sowebio closed 1 year ago
To investigate the issue we need additional information. Could you find in the corresponding GNAT Studio log file information like following: -> "info line" <- "&"info line\n"" <- "~"Line 101 of \"b__main.adb\" starts at address 0x404998 <adafinal+38> and ends at 0x40499a <ada init>.\n"" <- "^done"
"info line main.adb:1" <- "&"info line main.adb:1\n"" <- "~"Line 1 of \"hello/src/main.adb\" is at address 0x404726 <_ada_main> but contains no code.\n""
after you initialized the debugging process and how it looks like?
When debugging, GNAT Studio's behavior in the AVR target differs slightly from the NATIVE target. Especially at the start of the debugging session, if the stop at the beginning of the program checkbox is checked:
In NATIVE mode, the program execution stops at the first executable line at the beginning of the program. This is the expected behavior.
In AVR mode, the program execution stops in the Ada startup code generated by the compiler, located in /obj and prefixed by b__ just before the call to the main program!
So we thought at first that GNAT Studio did not work in AVR debug mode, although all conditions seemed to be met.
Then opening the file /obj/b__"hand_name".adb as an Ada source file and saw the breakpoint was functional. The debugging session can then continue...
This first breakpoint must appears on the first executable line in the main program source, not in /obj and prefixed by b__