4.26-dev: cprint tries to print from the wrong program and potentially chrashes
The crash depends on the exact variable definitions and order of those, but the issue can be seen in the following way:
1 apply this diff to cobcd.py
for payload_index in possibilities_1:
payload = GV_ModuleInformation.var_trie.storage_list[payload_index]
+ print ("fetching", payload.Name)
payload.FetchVariableData(False)
if not payload.not_in_context:
possibilities.append(payload_index)
target_limit = target_limit + 1
2 have a PROGA that calls PROGB and was started by cobcrun
3 start a GDB debugging session and issue the following commands:
ctbreak PROGB # from PROGA
continue # we stop in PROGB
cprint *
See output of
fetching SOME-VAR/PROGA
fetching OTHER-VAR/PROGA