This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Hello All
(Sorry for such a basic question; very probably there are some GDB tricks that I ignore).
In my MELT branch I have now some corrputed memory (maybe because I am inserting a pass at the wrong place in the pass tree). At some point, I call bb_debug, and it crashes because the field bb_next contains 0x101 (which is not a valid adress).
So I need to understand who is writing the 0x101 in that field.
How do you folks debug such issues.
An obvious strategy is to use the hardware watchpoint feature of GDB. However, one cannot nicely put a watchpoint on an address which is not mmap-ed yet.
One way is to do bit of stepping or inserting breakpoints in interesting places and see when the address gets mapped.
For other allocators, you can hack the code a bit to make the first allocated chunk huge enough to contain the corrupted area.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |