This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 126255 - Toggle breakpoints on non-executable lines should not be ignored
Summary: Toggle breakpoints on non-executable lines should not be ignored
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 blocker with 1 vote (vote)
Assignee: Maria Tishkova
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-30 09:38 UTC by alexandrov
Modified: 2016-07-06 14:38 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
gdb log (2.15 KB, text/plain)
2008-01-30 15:33 UTC, Alexander Pepin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description alexandrov 2008-01-30 09:38:12 UTC
Open args sample project. Set breakpoint at any line before first executable command, i.e. on 
>>int i
line:47
Run Debugger - breakpoint is ignored.
If to set breakpoint on line:50 - debugger stops at the breakpoint. 
gdb 6.6 is used.
On Windows this defect is not reproducible.
Comment 1 Alexander Pepin 2008-01-30 15:31:13 UTC
The bug is also reproducible on solaris. Gdb log from Linux machine is attached.
Comment 2 Alexander Pepin 2008-01-30 15:33:16 UTC
Created attachment 55771 [details]
gdb log
Comment 3 Alexander Pepin 2008-01-30 16:35:58 UTC
Looking at gdb log it seems that we did "step into" first (at line 50) and after that set a breakpoint at line 47 then
perform "continue". This explains why gdb does not stop at non-executable line if it is the first one in the executable
file. If we insert any executable line before this line then everything will work fine. For the same reason the bug is
not reproducible on Windows where "step into" goes to method definition (before the first line in the code).   
Comment 4 _ gordonp 2008-02-01 22:33:15 UTC
Alexander Pepin's analysis is correct. Only breakpoints before the 1st executable line of
code will be ignored. Even then, its platform specific (thats why it stops at line 47 on
Windows).

This problem is fixable, but is it really a P2? Breakpoints set on the 1st executable line
of code will work. About the only ones which won't are bps set on comments or uninitialized
declarations. Let me know if you agree that this should be a P3.

Note: Fixing this would be slightly dangerous. It would involve changing the startup state
model. Currently, I set a bp at main, run to it, and set bps at first-stop. To fix this I'd
have to either set bps before running, track which ones failed, run to 1st stop, set all failed
bps or set the bp in main and analyze which bps are in main but before that 1st bp. In either
case, messing with the startup state model is dangerous and I'll only do it if you really
think this is likely to affect users.
Comment 5 _ gordonp 2008-02-04 17:55:50 UTC
See previous comment. Closing as WONTFIX.
Comment 6 _ gordonp 2008-02-04 18:42:11 UTC
Per a request from QA, I'm reopening and downgrading. Will consider fixing in NB 7.0.
Comment 7 _ gordonp 2008-02-05 15:58:33 UTC
Per request from Jesse and because this is basically just a platform specific issue (and
doesn't happen on Windows), closing as WONTFIX.
Comment 8 Alexander Pepin 2008-02-22 01:29:50 UTC
I transform it to enhancement.