bitwiseworks / gcc-os2

Port of GCC compiler to OS/2
GNU General Public License v2.0
16 stars 2 forks source link

IBM debuggers can't show variable content #5

Open ydario opened 4 years ago

ydario commented 4 years ago

With code generated by gcc 4.x, the variable content is not visible most of the times.

Hand editing an assembly file generated from gcc 4.9.2 (using gcc3 output), showed that the only real difference is access to variables: gcc 4 uses ESP to access stack vars, gcc3 uses EBP. Changing gcc4 assembly to use EBP makes debuggers to work again.

Access with ESP seems a OS/2 only feature, gcc 9.2 on linux still uses EBP.

Also assembly of function start is not correctly aligned. push

stab1.gcc4A.txt stab1.gcc3.txt