AdaCore / gnatstudio

GNAT Studio is a powerful and lightweight IDE for Ada and SPARK.
399 stars 52 forks source link

Behaviour change suggestion: Different behavior of GNAT Studio depending on the target #147

Closed sowebio closed 9 months ago

sowebio commented 1 year ago

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:

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__

ogorodnik commented 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?