Restoring program state from a core file

后端 未结 2 1594
野的像风
野的像风 2021-02-19 11:06

Is it possible, under any circumstances, to restore the state of a program to what it was during the generation of a core file?

The reason I ask is that in order to take

相关标签:
2条回答
  • 2021-02-19 12:08

    It is theoretically possible to do exactly what you want, but (AFAICT) there is no support for this in GDB (yet).

    Your best bet is to use GDB-7.0 and use its embedded python scripting to re-implement the serialization function.

    0 讨论(0)
  • 2021-02-19 12:09

    That's what a core file does already? If you load gdb with the original executable and the core file

    gdb myprogram.exe -c mycorefile
    

    Then it'll go to the point at where it crashed. You can use all the normal inspection functionality to view the variables, see the stack trace and so on.

    Or have I misunderstood your question?

    0 讨论(0)
提交回复
热议问题