This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
real world reverse debugging success story
- From: Michael Snyder <msnyder at vmware dot com>
- To: gdb at sourceware dot org
- Date: Wed, 11 Nov 2009 16:20:26 -0800
- Subject: real world reverse debugging success story
Hey guys,
Just wanted to make note that I used reverse debugging to
solve a real world gdb bug (the recently submitted one for
dcache.c).
First I found where the lists were cross-linked, then I put
watchpoints on the list elements that were crossed, and ran
backwards. One watchpoint took me to dcache_alloc, and the
other to dcache_invalidate.
Then I used some bookmarks to look at the state of the list
before and after, and close in on the actual problem (which
was in fact in another function).
Doug rewrote my patch (thanks Doug), but he verified that
the actual bug was exactly what process record revealed it
to be.
Whee!
Michael
Stats: used an 8 million instruction cache, running as a
ring buffer. Had to record over 80 million instructions
before I tripped the bug. Saved core file with record log
was 250 megabytes, and reloaded fine.