Mail Archives: djgpp/1998/08/05/09:43:47
On Wed, 5 Aug 1998, Gurunandan R. Bhat wrote:
> (gdb) watch *0x6d17c
>
> where 0x6d17c is the address I want to watch. I works but with
> unpredictable results.
Yep, that's what I get also. That's why I said that I cannot get it to
work.
I'm afraid you will have to fall back to more mundane techniques. One
possibility is to insert a call to `exit' at a certain point before the
place where it crashes, put a breakpoint inside `exit', and when the
breakpoint is hit, see whether the linked list is already scrogged. By
moving the call to `exit' you can get a pretty good idea who overwrites
the list, and then debug that place as usual.
I would suggest to begin by inserting the call to `exit' just before the
crash locus and then move it away towards the beginning of the program.
Move it in large steps at first, until you find the farthest place from
the program beginning where the list isn't overwritten yet. After that,
bisect the suspect portion of the program until you zero in on the
villain.
- Raw text -