This is the mail archive of the gdb-prs@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]

Re: breakpoints/2119: gdb 6.4 prints errors when restarting programwith pending breakpoints


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/


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