When debugging a simple console program, Assembler Window can't display disassembly at the start of main program.
Debug output window will display these error lines :
<-data-disassemble -s 134516676 -e 134516677 -- 0>
^error,msg="Cannot access memory at address 0x8048fc4"
(gdb)
<-data-disassemble -s 134516560 -e 134517088 -- 0>
^error,msg="Cannot access memory at address 0x8048f50"
(gdb)
<-data-disassemble -s 134516380 -e 134516381 -- 0>
^error,msg="Cannot access memory at address 0x8048e9c"
(gdb)
<-data-disassemble -s 134516264 -e 134516560 -- 0>
^error,msg="Cannot access memory at address 0x8048e28"
(gdb)
<-data-disassemble -s 134516676 -e 134516677 -- 0>
^error,msg="Cannot access memory at address 0x8048fc4"
(gdb)
<-data-disassemble -s 134516560 -e 134517088 -- 0>
^error,msg="Cannot access memory at address 0x8048f50"
(gdb)
<-data-disassemble -s 134516380 -e 134516381 -- 0>
^error,msg="Cannot access memory at address 0x8048e9c"
(gdb)
Only when stepping into subroutine at the different unit, Assembler Window will display correct disassembly. And when going back to main program, Assembler Window will show nothing.
This bad behaviour will disappear when adding additional clauses to the main program.
Attached test project (project1.zip) will demonstrate this problem. It will disappear, when you enable the define DEBUG_PADDING at the main source.
This was tested by building the attached test project as an 32-bit program on top 64-bit Arch Linux and debugging it via 32-bit Lazarus.
Attached extra files which are debug log from Lazarus and output from Debug output window (debug info.zip) and main program and unit1 assembler files.
I like to have confirmation from others if this is a bug? So I can report it to bug tracker.
I have FPC 3.3.1-r39935 and Lazarus 2.1.0 r59300.