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.
Summary: | Debugger confuses source files with the same name | ||
---|---|---|---|
Product: | cnd | Reporter: | Alexander Pepin <apepin> |
Component: | Debugger | Assignee: | _ gordonp <gordonp> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | ||
Priority: | P1 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
gdb log
new patch proposed by Gordon |
Description
Alexander Pepin
2008-10-09 10:52:31 UTC
Created attachment 71446 [details]
gdb log
Suggested fix (post NB65): In LineBreakpointImpl.getBreakpointCommand(), return getBreakpoint().getPath() for the 1st validation attempt if there are no embedded spaces in the path. The 2nd attempt (assuming the fix to 149214 gets approved and integrated) should generate a path with the project base directory removed. The last attempt should have all directory information removed. The above assumes BreakpointImpl.completeValidation() will make subsequent validation attempts after certain types of validation failure. The fix for 149214 provided this capability, although NB.next should also try alternate source directories provided by the user (which the project system currently silently ignores when the user adds them:-). It's a very serious regression and should be fixed in 6.5 *** Issue 149245 has been marked as a duplicate of this issue. *** Verified in trunk build 200810290201. This was partially fixed in http://elif.russia.sun.com/hg/release65_cnd_freeze/rev/ac0e764c9a2a but not pushed to the trunk before code freeze. The release65_cnd_freeze changes and further changes, were pushed to the trunk with http://hg.netbeans.org/main?cmd=changeset;node=79fff0b61390. The current fix attempts to send an absolute path to gdb in the -break-insert command. If the absolute path contains embedded spaces, then a partial path is sent. This is because gdb/mi doesn't correctly handle quoting (a fix is planned in mi3). I've filed IZ #151761 about this corner case and am closing this issue as fixed in trunk. Reopening for release65 (it got closed when I marked it FIXED in trunk). I confirm that it works fine in NB6.1, so we have a regression. I disagree with the proposed fix. Problems with spaces in the project path should be solved in a separate issue. Created attachment 73011 [details]
new patch proposed by Gordon
I agree and approve this fix Description of the bug (including IZ #): IZ #149603 Debugger confuses source files with the same name Impact assessment i.e. why it is a showstopper? This bug is a showstopper because it causes breakpoints from one project to cause the debugger to stop in another project if the file name (not path) is the same. Risk assessment i.e. why is it safe? The proposed fix basically restores us to the functionality we had in NB 6.1. Confirmation of peer code review and QE verification of fix Reviewed by Egor Ushakov Changeset info (for reviewing diffs) http://hg.netbeans.org/release65?cmd=changeset;node=0a02e8d23ea0 verified in a preliminary FCS build I still have the exact same problem with Netbeans 8.2. I'm debugging a project, setting a BP in a file named passwd.c, but when jumping in the function called, which belongs to this file, the debugger opens another file named passwd.c which is in another part of the project (I have 3 different path with such a file). The only workaround I have found was to rename the file, which is really painful, considering this is a 20 years old Open Source project that is unlikely to accept such a rename... |