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.
NetBeans7.3rc1 Mode: Debug test. Does not stop at breakpoints. Режим: Выполнить отладку теста. Не останавливается в точках останова.
*** Bug 226175 has been marked as a duplicate of this bug. ***
From email: Создал библиотеку статическую. Написал тест для проверки. В тесте ставлю точку останова и запускаю отладку в следующей последовательности. Проекты Файлы тестов выбираю тест правой кнопкой запускаю -выполнить отладку теста Тест полностью выполняется не останавливаясь на точке останова. Дебагер видно что вызывается. Что может быть неправильно? Раньше работало. Ошибка у меня воспроизводится всегда. Может сменили версию Jva или что то еще? У меня Java 1.6.0 OpenJdk. OC SUSE 12.2 NetBeans7.3rc2 хотя эта проблема появилась в NetBeans7.3rc1 NetBeans7.3rc2 скачен и установлен в полной комплектации.
Scenario: - Create C/C+ Static Library project - Add C file - Add such code: int f(int x, int y) { return x + y; } - Create "New C Simple Test" test - Fix testF() function void testF() { int x = 1; int y = 3; int result = f(x, y); if (result != 4) { printf("%%TEST_FAILED%% time=0 testname=testF (newsimpletest) message=error message sample\n"); } } - Run test ==> ok - Select test, call context menu, select Debug Test ==> debugger fails gdb log: This log is saved to: C:\Users\valera\AppData\Local\Temp\gdb-cmds2073901070363309290.log NB build: 201302062200 =thread-group-added,id="i1" ~"GNU gdb (GDB) 7.4\n" ~"Copyright (C) 2012 Free Software Foundation, Inc.\n" ~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law. Type \"show copying\"\nand \"show warranty\" for details.\n" ~"This GDB was configured as \"i686-pc-mingw32\".\nFor bug reporting instructions, please see:\n" ~"<http://www.gnu.org/software/gdb/bugs/>.\n" &"C:\\\\Users\\\\valera/.gdbinit: No such file or directory.\n" (gdb) 2-list-features 3-gdb-set print repeat 0 4-gdb-set backtrace limit 1024 5-gdb-set print elements 0 6-gdb-set follow-fork-mode parent 7-gdb-set detach-on-fork on 8-enable-pretty-printing 9-file-symbol-file "C:/Users/valera/Documents/NetBeansProjects/CppStaticLibrary_1/dist/Debug/MinGW-Windows/libcppstaticlibrary_1.a" 10-file-exec-file "C:\\Users\\valera\\Documents\\NetBeansProjects\\CppStaticLibrary_1\\build/Debug/MinGW-Windows/tests/TestFiles/f1" 2^done,features=["frozen-varobjs","pending-breakpoints","thread-info","data-read-memory-bytes","breakpoint-notifications","ada-task-info"] (gdb) 3^done (gdb) 4^done (gdb) 5^done (gdb) 6^done (gdb) 7^done (gdb) 8^done (gdb) 9^error,msg="`C:\\Users\\valera\\Documents\\NetBeansProjects\\CppStaticLibrary_1\\dist\\Debug\\MinGW-Windows\\libcppstaticlibrary_1.a': can't read symbols: File format not recognized." (gdb) 10^done 11cd C:\Users\valera\Documents\NetBeansProjects\CppStaticLibrary_1 12-exec-arguments (gdb) &"cd C:\\Users\\valera\\Documents\\NetBeansProjects\\CppStaticLibrary_1\n" ~"Working directory C:\\Users\\valera\\Documents\\NetBeansProjects\\CppStaticLibrary_1.\n" 11^done (gdb) 12^done (gdb) 13-break-insert -t main 14-exec-run 13^error,msg="No symbol table is loaded. Use the \"file\" command." (gdb) &"warning: Warning: Failed to open TTY /dev/pty0, error 0x3.\n" =thread-group-started,id="i1",pid="14268" =thread-created,id="1",group-id="i1" ~"[New Thread 14268.0x3134]\n" 14^running *running,thread-id="all" (gdb) =library-loaded,id="C:\\Windows\\system32\\ntdll.dll",target-name="C:\\Windows\\system32\\ntdll.dll",host-name="C:\\Windows\\system32\\ntdll.dll",symbols-loaded="0",thread-group="i1" =library-loaded,id="C:\\Windows\\syswow64\\kernel32.dll",target-name="C:\\Windows\\syswow64\\kernel32.dll",host-name="C:\\Windows\\syswow64\\kernel32.dll",symbols-loaded="0",thread-group="i1" =library-loaded,id="C:\\Windows\\syswow64\\KernelBase.dll",target-name="C:\\Windows\\syswow64\\KernelBase.dll",host-name="C:\\Windows\\syswow64\\KernelBase.dll",symbols-loaded="0",thread-group="i1" =library-loaded,id="C:\\Windows\\syswow64\\msvcrt.dll",target-name="C:\\Windows\\syswow64\\msvcrt.dll",host-name="C:\\Windows\\syswow64\\msvcrt.dll",symbols-loaded="0",thread-group="i1" %SUITE_STARTING% newsimpletest %SUITE_STARTED% %TEST_STARTED% testF (newsimpletest) %TEST_FINISHED% time=0 testF (newsimpletest) %SUITE_FINISHED% time=0 =thread-exited,id="1",group-id="i1" =thread-group-exited,id="i1",exit-code="0" *stopped,reason="exited-normally" 15-stack-list-frames (gdb) 15^error,msg="No registers." No answer for: 14-exec-run (gdb)
I think main problem in these lines in gdb log NB 7.2 7-file-symbol-file "C:/Users/valera/Documents/NetBeansProjects/CppStaticLibrary_2/dist/Debug/MinGW-Windows/libcppstaticlibrary_2.a" 8-file-exec-and-symbols "C:\\Users\\valera\\Documents\\NetBeansProjects\\CppStaticLibrary_2\\build/Debug/MinGW-Windows/tests/TestFiles/f1" NB 7.3 9-file-symbol-file "C:/Users/valera/Documents/NetBeansProjects/CppStaticLibrary_2/dist/Debug/MinGW-Windows/libcppstaticlibrary_2.a" 10-file-exec-file "C:\\Users\\valera\\Documents\\NetBeansProjects\\CppStaticLibrary_2\\build/Debug/MinGW-Windows/tests/TestFiles/f1"
misha_shar53, не воспринимайте комментарии в "bug tracker" как комментарии к вам. Идея понятна. Если вместо "C/C++ Application" использовать "C/C++ Static Library", то отладчик в тестах не работает (одинаково и на всех платформах)
Soldatov is right Steps to reproduce 1) Build a static C/C++ library 2) Add unit tests (cppunit/cunit) 3) Try to debug the unit tests Bug: The GDB searches the static library for symbols, but naturally cannot load the symbol table. The executable itself (unit test) is not searched for symbols Netbeans 7.2 used the flag -file-exec-and-symbols Netbeans 7.3 uses the flag -file-exec-file Workaround: As intermediate workaround you might use the GDB init file to add a symbol file like adding a line symbol-file <your executable>
Fixed in: http://hg.netbeans.org/cnd-main/rev/c9522db9161c
Integrated into 'main-golden', will be available in build *201303132300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/c9522db9161c User: Nikolay Koldunov <henk89@netbeans.org> Log: Fixed #225505 - Does not stop at breakpoints.
Verified in trunk 201303132300
Extra fix (should not be integrated into the releases branch): http://hg.netbeans.org/cnd-main/rev/da98b32eced5
Integrated into 'releases', will be available in build *201303141828* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/fae8a1a91e85 User: Nikolay Koldunov <henk89@netbeans.org> Log: Fixed #225505 - Does not stop at breakpoints. (transplanted from c9522db9161c6433652bcbc02b26bdfd95f44701)
Integrated into 'main-golden', will be available in build *201303142300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/da98b32eced5 User: Nikolay Koldunov <henk89@netbeans.org> Log: Fixed #225505 - Does not stop at breakpoints.
Verified in build 201303172200