I have looked for a similar question to mine but the closest I found was Continue debugging after SegFault in GDB
My goal is to invoke a function in GDB from a coredump. I have a C++ type which has the operator<<
defined and I would like to pretty print this type without having to write a pretty printer in python.
From what I have found so far it seems that GDB treats coredumps differently from regular inferiors which have active execution and hence cannot invoke functions (as is confirmed by this answer which states you can't use continue for a coredump).
Though I can see why that might be the case by default, could GDB be patched to load a coredump into memory and invoke it as a running process? If the program terminated due to a Seg. Fault then it is possible to manually alter the broken path after loading the core in GDB and potentially even continue executing the program after.