From d6d7f15c912ed6371c8cf15a93f43488d6fc5efb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciro=20Santilli=20=E5=85=AD=E5=9B=9B=E4=BA=8B=E4=BB=B6=20?= =?UTF-8?q?=E6=B3=95=E8=BD=AE=E5=8A=9F?= Date: Wed, 28 Aug 2019 00:00:01 +0000 Subject: [PATCH] reverse debug: reverse finish master tip --- README.adoc | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/README.adoc b/README.adoc index c64e40a..eefc4c9 100644 --- a/README.adoc +++ b/README.adoc @@ -9819,7 +9819,7 @@ You can still send key presses to QEMU however even without the mouse capture, j ==== Reverse debug the emulator -While step debugging any complext program, you always end up feeling the need to step in reverse to reach the last call to some function before the failure point. +While step debugging any complext program, you always end up feeling the need to step in reverse to reach the last call to some function that was called before the failure point, in order to trace back the problem to the actual bug source. While GDB "has" this feature, it is just too broken to be usable, and so we expose the amazing Mozilla RR tool conveniently in this repo: https://stackoverflow.com/questions/1470434/how-does-reverse-debugging-work/53063242#53063242 @@ -9853,6 +9853,24 @@ To restart debugging again after quitting `rr`, simlpy run on your host terminal rr replay .... +Programs often tend to blow up in very low frames that use values passed in from higher frames. In those cases, remember that just like with forward debugging, you can't just go: + +.... +up +up +up +reverse-next +.... + +but rather, you must: + +.... +reverse-finish +reverse-finish +reverse-finish +reverse-next +.... + ==== Debug gem5 Python scripts Start pdb at the first instruction: