This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
Re: breakpoints/2119: gdb 6.4 prints errors when restarting programwith pending breakpoints
- From: Greg Law <glaw at undo-software dot com>
- To: nobody at sources dot redhat dot com
- Cc: gdb-prs at sources dot redhat dot com,
- Date: 25 Jul 2006 15:38:02 -0000
- Subject: Re: breakpoints/2119: gdb 6.4 prints errors when restarting programwith pending breakpoints
- Reply-to: Greg Law <glaw at undo-software dot com>
The following reply was made to PR breakpoints/2119; it has been noted by GNATS.
From: Greg Law <glaw@undo-software.com>
To: gdb-gnats@sources.redhat.com
Cc:
Subject: Re: breakpoints/2119: gdb 6.4 prints errors when restarting program
with pending breakpoints
Date: Tue, 25 Jul 2006 16:35:20 +0100
I think this issue may be more serious than first thought.
If I've understood correctly, the problem here is that when the inferior
is restarted, gdb tries to re-apply all the breakpoints in shared
libraries, but libraries that the program loads explicitly (i.e. with
dlopen) are not mapped in yet. Usually this means a bogus breakpoint
address, so the ptrace operation fails, so we get the error message.
But with address-space randomization (e.g. used by modern Linuxes) the
location of the stale breakpoint might be anywhere, including in data
sections. The effect is gdb writes a bunch of breakpoint instructions
at essentially random locations in the inferior's address space, which
can lead to very subtle issues.
Cheers,
Greg
--
Greg Law, Undo Software http://undo-software.com/