Re: Breakpoint loss under low memory conditions
dwk <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <CAPkwjGtqJ2d2jZ9aJXCY72U6Nhw21YEpKbxGWgHzEGA9ybwutw@mail.gmail.com> |
When gdb sets a breakpoint on an executable page by writing a word through ptrace, that page becomes a private+anonymous copy of the original shared mapping. It's treated like any other anonymous mapping and will be paged out and in separately from the original shared executable pages. So the scenario you are concerned about is not an issue. For more info: https://yarchive.net/comp/linux/ptrace_mmap.html --dwk. On Tue, Nov 20, 2018, 2:31 AM Stoll, Walter <[email protected] wrote: > Ladies and Gentlemen > > Under low memory conditions, the Linux kernel may evict pages that contain > executable code sections. If such a page was modified by a breakpoint, then > the breakpoint will get lost when the page is finally faulted in. Is this a > scenario that can happen in reality or does gdb and/or the kernel provide > some means which prevent this from happening ? > > Regards > Walter Stoll >