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 201700 - Breakpoint does not work
Summary: Breakpoint does not work
Status: RESOLVED WONTFIX
Alias: None
Product: cnd
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 7.0.1
Hardware: Sun Solaris
: P1 normal (vote)
Assignee: Egor Ushakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-06 18:25 UTC by wotakwu
Modified: 2011-09-14 16:50 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot showing the error message (29.15 KB, image/jpeg)
2011-09-06 18:25 UTC, wotakwu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description wotakwu 2011-09-06 18:25:58 UTC
Created attachment 110441 [details]
Screenshot showing the error message

I just installed NetBeans IDE 7.01 and tried a very simple C++ program:

#include <stdio.h>
#include <cstdlib>
using namespace std;
int main(int argc, char** argv) {
    printf("Hello World C++!\n");
    printf("bye!\n");
//    while (1)
//        for (int i=0; i<100;i++)
//            i = i + 1 -1;
    return 0;
}

Set a breakpoint in the source file and started the debugger. The debugger did not stop at the breakpoint. If I allowed the infinite loop to run, I would see an error message at the breakpoint by pointing at the breakpoint marker:

mi_cmd_break_insert: Unknown option ``f"

Please see the attachment.

If I used gdb in a terminal window, everything worked fine; the breakpoint did work.
Comment 1 soldatov 2011-09-07 06:48:02 UTC
I think You uses old gdb. 6.3 or same.
Comment 2 Vladimir Voskresensky 2011-09-07 14:39:18 UTC
could you, please, provide info about your gdb version
Comment 3 wotakwu 2011-09-07 16:36:15 UTC
Thanks for looking into the issue. When I type gdb on the terminal window, here is what is shows:

GNU gdb 5.2.1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc-sun-solaris2.8".
Comment 4 Vladimir Voskresensky 2011-09-07 16:49:16 UTC
We are using MI to communicate with gdb and we need version > 6.3 to work correctly. Have you seen warning from IDE that your version of gdb is old and you use it on own risk :-)?
Please, upgrade gdb to more recent one.
Comment 5 Egor Ushakov 2011-09-08 10:06:06 UTC
You may also run the IDE with -J-Dgdb.breakpoints.pending.disabled=true.
Anyway it is strange that the IDE sends -f to gdb 5.2.1...
Could you attach the gdb log (window/debug/debugger console)?
Comment 6 wotakwu 2011-09-08 17:02:15 UTC
I'm still trying to set up a new version of gdb (7.3). I'm having trouble in building it first, however. If there is a binary readily available for Solaris-sparc, please let me know.

Started the IDE with "-J-Dgdb.breakpoints.pending.disabled=true" and debugged the program. The program did not finish, nor it stopped at the breakpoint. Pressed the Stop button to terminate. Really don't know what's going on. 

How do I create a gdb log? There seems to be a "set logging on" command, but it is not available on version 5.2.1.
Comment 7 Egor Ushakov 2011-09-09 08:51:16 UTC
for gdb binary try http://www.opencsw.org/
gdb log is just a text from debugger console view after you start the debugger (window/debugging/debugger console)
Comment 8 wotakwu 2011-09-09 16:24:15 UTC
(asg1-usca-04)csh371 gdb
GNU gdb 5.2.1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc-sun-solaris2.8".
Comment 9 wotakwu 2011-09-09 17:08:18 UTC
Now I've built gdb successfully. But when I ran it, it gave this error message:

Interpreter `console' unrecognized

What's the problem here?
Comment 10 Egor Ushakov 2011-09-12 08:59:02 UTC
please check if you have anything in your ~/.gdbrc and try to remove it
Comment 11 wotakwu 2011-09-12 16:49:57 UTC
I don't have such file in my home folder.
Comment 12 Egor Ushakov 2011-09-13 10:09:35 UTC
you may try this:
http://cygwin.com/ml/gdb/2009-11/msg00183.html
Comment 13 wotakwu 2011-09-13 17:41:44 UTC
I had looked at that before. It does not seem to apply in my case. I didn't have the "--disable-tui" option when configuring gdb. The log file shows that.
Comment 14 Egor Ushakov 2011-09-14 08:58:08 UTC
does gdb work from the console?
please try to start like this:
gdb --interpreter mi /bin/ls
and then input "run"
Comment 15 wotakwu 2011-09-14 16:50:04 UTC
After having built gdb successfully, I've been trying to get it to run on a terminal window. It still gives the error with the --interpreter option:

(asg1-usca-04)csh396 ~/bin/gdb --interpreter mi /bin/ls
Interpreter `mi' unrecognized

I installed the newly built gdb (v7.3) in my own bin folder. Starting the system installed gdb (v5.2.1) with the --interpreter option works fine. Running the new gdb with --version gives the following:

(asg1-usca-04)csh399 ~/bin/gdb --version
GNU gdb (GDB) 7.3
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "sparc-sun-solaris2.10".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.

Not sure if this contains any useful information for trouble-shooting this problem.