possibly leave "C" source lines in for code "outside of COBOL"
I'm currently debugging a broken COBOL dump. That's the backtrace:
#0 0x00007ffff7bbbe89 in is_field_display (f=0x7fffffff4d10) at termio.c:409
#1 0x00007ffff7bbce82 in cob_dump_field (level=3,
name=0x7fffaf1a0bf4 "W101-PRGM", fa=0x7fffaf4b52c0 <f_2692.8218>,
offset=0, indexes=0) at termio.c:634
#2 0x00007fffaf0ced48 in MYPROG_ (entry=-10, b_2671=0xabc390 "",
b_12067=0xa <Address 0xa out of bounds>) at /tmp/copybooks/END.cpy:13
#3 0x00007ffff7b8efc9 in cob_dump_module (
reason=0x7ffff7dda240 <abort_reason> "subscript of 'W382-VAR' out of bounds: 14") at common.c:8638
#4 0x00007ffff7b7ea61 in cob_terminate_routines () at common.c:631
#5 0x00007ffff7b81947 in cob_stop_run (status=1) at common.c:2252
#6 0x00007ffff7b837fe in cob_check_subscript (i=14, max=13,
name=0x7fffaf1998e9 "W382-VAR", odo_item=0) at common.c:3311
As seen in b_12067=0xa <Address 0xa out of bounds>) at /tmp/copybooks/END.cpy:13
GDB is lost because there is no source here (the copybook is the end of this program). 0xa
is an internal entry point (for the dump code), it is nothing that is directly related to COBOL. As the "C" reference was removed we see the "Address 0xa out of bounds" message.