IBM debuggers can't show variable content #5

Open
opened 2026-01-29 22:22:29 +00:00 by claunia · 0 comments
Owner

Originally created by @ydario on GitHub (Dec 17, 2019).

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

Originally created by @ydario on GitHub (Dec 17, 2019). 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](https://user-images.githubusercontent.com/1044865/70975822-fe3a8a80-20aa-11ea-8660-2fda18ac7c0e.png) [stab1.gcc4A.txt](https://github.com/bitwiseworks/gcc-os2/files/3972025/stab1.gcc4A.txt) [stab1.gcc3.txt](https://github.com/bitwiseworks/gcc-os2/files/3972026/stab1.gcc3.txt)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bitwiseworks/gcc-os2#5