RE: hbreak reads memory
"Breazeal, Don" <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <DA279C53C4A5884A907135DFCD7A059A37EF9758@NA-MBX-02.mgc.mentorg.com> |
Adrian, I think this is due to some function prologue analysis. You might try setting the breakpoint on an address, e.g. instead of 'hbreak foo' use 'hbreak *foo'. The breakpoint should then be on the address of the entry point to the function and the memory accesses may be reduced or eliminated. You might also try 'set trust-readonly-sections' and/or set mem inaccessible-by-default. Those may or may not help. --Don > -----Original Message----- > From: [email protected] [mailto:[email protected]] On > Behalf Of Alexandru-Adrian Oltean > Sent: Tuesday, July 26, 2016 11:29 PM > To: [email protected] > Subject: hbreak reads memory > > Hi everyone, > > I noticed that setting a hardware break using hbreak will trigger a > memory access at the address where the breakpoint is supposed to be > installed. Can someone explain why is that memory access needed? I'm > thinking that we might be in a situation where that memory area is not > yet initialized/accessible (maybe MMU not configured yet) and the > access corrupts the debugged target. > > Thanks, > Adrian