additional cstep command (and patch for a gdbinit file)
As I had the need for this (in the context of step
goes into the libcob library), I've tried to add it with a command, and that actually "worked". Here's the patch until it is done in the python extension:
define cstep
set $steps = 1
if $argc == 1
set $steps = $arg0
end
set $i = 0
while $i < $steps
advance cob_trace_stmt
finish
set $i = $i + 1
end
# refresh only add this if you want to use GDB's TUI mode
end
document cstep
Step program until it reaches a different COBOL source line.
Usage: cstep [N]
Argument N means step N times (or till program stops for another reason).
end
The biggest issue with that is "flickering" in tui-mode (sometimes the library code pops up, then is overwritten by the COBOL source). If anyone knows a way to directly temporarily disabling updates of the source window that would be a nice addition - but in any case that is only related to tui-mode.
I guess that the python extension could do that better in any case.
Edited by Simon Sobisch