This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Pending breakpoints on lines that don't exist
- From: Marc Khouzam <marc dot khouzam at ericsson dot com>
- To: "'gdb at sourceware dot org'" <gdb at sourceware dot org>
- Date: Tue, 3 Jan 2012 16:30:21 -0500
- Subject: Pending breakpoints on lines that don't exist
Hi,
I grabbed the 7.4 branch to make sure Eclipse was ready
for it. After no longer using the removed command
'maint set python print-stack on'
all our JUnit tests now pass with the new GDB except
one, which attempts to set a breakpoint on an invalid line.
GDB 7.4 now sets a pending breakpoint on lines that don't
exist. Is this a regression or a wanted change?
I didn't want to update my tests if this was a regression.
The change is illustrated in the two short sessions below.
Note that this also happens using line 0 (which is what
my JUnit test does).
Thanks
Marc
> gdb.7.3 a.out
GNU gdb (GDB) 7.3.1
(gdb) l
1 int main() { return 0; }
(gdb) l
Line number 2 out of range; a.cc has 1 lines.
(gdb) b 2
No line 2 in file "a.cc".
(gdb) info b
No breakpoints or watchpoints.
> gdb.7.4 a.out
GNU gdb (GDB) 7.3.91.20120103-cvs
(gdb) l
1 int main() { return 0; }
(gdb) l
Line number 2 out of range; a.cc has 1 lines.
(gdb) b 2
No line 2 in the current file.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (2) pending.
(gdb) info b
Num Type Disp Enb Address What
1 breakpoint keep y <PENDING> 2