cobol: Changes for GDB-COBOL functionality.
Enhances COBOL compiler to provide currency sign and field content to GDB for debugging.
This commit introduces changes to the GCC COBOL compiler to support enhanced debugging capabilities in GDB. The primary goal is to make the current currency sign and field contents available to the debugger, which is crucial for inspecting program state when one COBOL program calls another or during stack frame changes. These updates improve the debugger’s ability to analyze the runtime behavior of COBOL programs.
In Details
This patch enhances the COBOL compiler's debug information generation to support new GDB features. It modifies genapi.cc and symbols.cc to save and associate currency state and field bindings with program entry and stack frames, respectively. The libgcobol library is updated to manage this currency state, ensuring that GDB can correctly retrieve and display these runtime details, particularly in scenarios involving recursion and inter-program calls.
- currency sign
- In COBOL, a character used to indicate the position of a currency symbol in a numeric edited item. This commit makes this information available for debugging.
- field contents
- The actual data stored within a variable or data item in a program. This commit enables GDB to inspect these values during debugging.
- stack frame
- A data structure that stores information about an active function call, including local variables, parameters, and the return address. Changes in stack frames are important for understanding program execution flow.