Re: Why are these two methods default_memory_insert_breakpoint() and default_memory_remove_breakpoint() called multiple times

John Baldwin <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
On 5/31/23 2:12 AM, hilbert via Gdb wrote:
> Hi,
> 
>           I just inserted a breakpoint, shouldn't the two methods default_memory_insert_breakpoint() and default_memory_remove_breakpoint() be used only once?
> 
> There is only one breakpoint, why both functions default_memory_insert_breakpoint() and default_memory_remove_breakpoint() are called before stopping and after stopping (after the continue command), why?

GDB inserts some of its own internal breakpoints.  For example,
in the runtime linker/loader there is a special symbol GDB sets
a breakpoint on so it can be notified about shared libraries being
loaded or unloaded.  If you are using libthread_db on a target it
may install internal breakpoints to detect thread creation and
thread exit as well.

-- 
John Baldwin
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.