This is the mail archive of the gdb@sourceware.org mailing list for the GDB 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]

breakpoint for accessing memory location


Hi,

I've got a shared lib that I programmed to store some data on the heap in order to retrieve them later. The main program which loads the shared lib appears to overwrite that location in memory, before the next time I want to use it (which is weird because the main program shouldn't have a clue about this particular action of the shared lib).

So, in order to find out which part of the main program is being nasty, I want to set some kind of breakpoint that alerts me whenever that memory location is being written to.

Is that possible using gdb?


(P.S. In the manual, I found the gdb command [break *address], but from its behaviour, I think it's meant to do something different from what I want.)



Thanks for any help,


Erik Leunissen



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]